From: Chuck Scott Date: Fri, 5 Feb 2016 18:00:31 +0000 (-0500) Subject: Various updates per meeting with Toms Moms X-Git-Tag: v1.0.13^2~1 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=3fd56c2dfabb77d4916d90da7473716684e6ae7b;p=WP-Themes%2FTomsMomsCookies.git Various updates per meeting with Toms Moms --- diff --git a/functions.php b/functions.php index 7aa027e..c7bde4c 100755 --- a/functions.php +++ b/functions.php @@ -196,13 +196,13 @@ function tm_added_checkout_fields_email( $keys ) { function add_custom_fields_to_order_printout( $fields, $order ) { $new_fields = array(); if( get_post_meta( $order->id, 'Gift Message', true ) ) { - $new_fields['Gift Message'] = array( + $new_fields['Gift Message'] = array( 'label' => 'Gift Message', 'value' => get_post_meta( $order->id, 'Gift Message', true ) ); } if( get_post_meta( $order->id, 'FedEx Shipping', true ) ) { - $new_fields['FedEx Shipping'] = array( + $new_fields['FedEx Shipping'] = array( 'label' => 'FedEx Shipping', 'value' => get_post_meta( $order->id, 'FedEx Shipping', true ) ); @@ -266,4 +266,21 @@ if ( ! current_user_can('manage_options') && ! current_user_can('edit_product') } } +// Change "Processing" to "New Order" +function glm_change_order_status_names( $order_statuses ) { + + $new_order_statuses = array(); + + // add new order status after processing + foreach ( $order_statuses as $key => $status ) { + $new_order_statuses[ $key ] = $status; + if ( 'wc-on-hold' === $key ) { + $order_statuses[$key] = 'New Order'; + } + } + + return $order_statuses; +} +add_filter( 'wc_order_statuses', 'glm_change_order_status_names' ); + ?> diff --git a/woocommerce/print-order/print-content.php b/woocommerce/print-order/print-content.php new file mode 100644 index 0000000..a718b69 --- /dev/null +++ b/woocommerce/print-order/print-content.php @@ -0,0 +1,172 @@ + + +
+ + +
+

+
+
+ + +
+ + +
+
+

+
+ + get_formatted_billing_address() ) _e( 'N/A', 'woocommerce-delivery-notes' ); else echo apply_filters( 'wcdn_address_billing', $order->get_formatted_billing_address(), $order ); ?> + +
+
+ +
+

+
+ + get_formatted_shipping_address() ) _e( 'N/A', 'woocommerce-delivery-notes' ); else echo apply_filters( 'wcdn_address_shipping', $order->get_formatted_shipping_address(), $order ); ?> + +
+
+ + +
+ + +
+

+ + + + +
+ + +
+ + + + + + + + + + + + get_items() ) > 0 ) : ?> + get_items() as $item ) : ?> + + get_product_from_item( $item ), $item ); + $item_meta = new WC_Order_Item_Meta( $item['item_meta'], $product ); + ?> + + + + + + + + + + + + + get_order_item_totals() ) : ?> + + + + + + + + + + +
+ + + + + + + display(); ?> + +
+ exists() && $product->is_downloadable() && $order->is_download_permitted() ) : ?> + +
+
get_item_downloads( $item ) ) ); ?>
+ + + + + +
+
+ + +
+
+ + + get_formatted_line_subtotal( $item ); ?> +
+ + +
+ + +
+ +

+ + + + +
+ + +
+ + + +
+ + +
+
+ +
+ +
+ +
+ + +