Updated by Michael Visser 2016-03-30 View revision File functions.php Modified Side-by-side diff More Ignore whitespace Hide word diff <?php -function custom_woo_ce_order_fields( $fields ) { - - $fields[] = array( - 'name' => 'order_items_static', - 'label' => __( 'Order Items: Static Field', 'woo_ce' ), - 'hover' => __( 'Custom Field within functions.php', 'woo_ce' ) - ); - return $fields; - -} -add_filter( 'woo_ce_order_fields', 'custom_woo_ce_order_fields' ); - function custom_woo_ce_extend_order_items_combined( $order ) { $order->order_items_static = 'Static value';
Updated by Michael Visser 2016-01-14 View revision File functions.php Modified Side-by-side diff More Ignore whitespace Hide word diff <?php function custom_woo_ce_order_fields( $fields ) { -$fields[] = array( + $fields[] = array( 'name' => 'order_items_static', 'label' => __( 'Order Items: Static Field', 'woo_ce' ), 'hover' => __( 'Custom Field within functions.php', 'woo_ce' )
Created by Michael Visser 2016-01-14 View revision File functions.php Added Side-by-side diff More Ignore whitespace Hide word diff +<?php +function custom_woo_ce_order_fields( $fields ) { + +$fields[] = array( + 'name' => 'order_items_static', + 'label' => __( 'Order Items: Static Field', 'woo_ce' ), + 'hover' => __( 'Custom Field within functions.php', 'woo_ce' ) + ); + return $fields; + +} +add_filter( 'woo_ce_order_fields', 'custom_woo_ce_order_fields' ); + +function custom_woo_ce_extend_order_items_combined( $order ) { + + $order->order_items_static = 'Static value'; + return $order; + +} +add_filter( 'woo_ce_order_items_combined', 'custom_woo_ce_extend_order_items_combined' ); +?>