orders

Filter orders by specific meta fields in WooCommerce admin orders list

牧云@^-^@ 提交于 2020-06-22 22:57:06
问题 Can anyone let me know, how can i add / set filter by company name in woo-commerce order page. and please share functions or show my error so i can solved it. i tried it but not working. you help is much appreciated. add_action( 'restrict_manage_posts', 'admin_shop_order_by_product_type_filter' ); function admin_shop_order_by_product_type_filter(){ global $pagenow, $post_type; if( 'shop_order' === $post_type && 'edit.php' === $pagenow ) { $domain = 'woocommerce'; $filter_id = 'filter_billing

Change sorting of WooCommerce My account customer orders

大憨熊 提交于 2020-06-08 19:42:31
问题 In WooCommerce, customers can log in to their account and see the order history. By default the orders are displaying with the newest order date first. I want to turn this around, so the order with the oldest date shows first. I can't find any place to change ordering from ASC/DESC, looking in the template file woocoommerce/myaccount/orders.php file. <table class="woocommerce-orders-table woocommerce-MyAccount-orders shop_table shop_table_responsive my_account_orders account-orders-table">

Change sorting of WooCommerce My account customer orders

∥☆過路亽.° 提交于 2020-06-08 19:42:06
问题 In WooCommerce, customers can log in to their account and see the order history. By default the orders are displaying with the newest order date first. I want to turn this around, so the order with the oldest date shows first. I can't find any place to change ordering from ASC/DESC, looking in the template file woocoommerce/myaccount/orders.php file. <table class="woocommerce-orders-table woocommerce-MyAccount-orders shop_table shop_table_responsive my_account_orders account-orders-table">

Add a custom meta box on order edit pages and display it on the customer order pages

故事扮演 提交于 2020-05-26 09:36:16
问题 In WooCommerce, would like to add a custom meta box on WooCommerce Admin order pages. In this box, I just want to enter a tracking number in a text field that saves to that order. Then on the customer view order page, I would like to display a button that opens a modal with tracking information. The modal will just pull in an iframe with a URL that has the tracking number at the end. The courier company I'm using has a tracking website so for now I'm just going to display the iframe in the

Add a custom meta box on order edit pages and display it on the customer order pages

醉酒当歌 提交于 2020-05-26 09:36:06
问题 In WooCommerce, would like to add a custom meta box on WooCommerce Admin order pages. In this box, I just want to enter a tracking number in a text field that saves to that order. Then on the customer view order page, I would like to display a button that opens a modal with tracking information. The modal will just pull in an iframe with a URL that has the tracking number at the end. The courier company I'm using has a tracking website so for now I'm just going to display the iframe in the

Customize order item meta only for WooCommerce admin email notifications

生来就可爱ヽ(ⅴ<●) 提交于 2020-05-23 10:18:26
问题 I need to add custom taxonomy to admin new order emails but not to customer emails. My current code displays my custom taxonomy for each item in the order but it is showing up in both admin and customer emails, which I don't want. Looking thru email-order-items.php I don't see a way to utilize $sent_to_admin in the hook that I am using. Am I missing something? How do I add my custom taxonomy only to admin emails using just hooks and filters? add_action( 'woocommerce_order_item_meta_end',

Get and use the product type in WooCommerce

£可爱£侵袭症+ 提交于 2020-05-16 18:59:26
问题 I'm working on a project and I'm stuck in getting Woocommerce product types as 'simple', 'variable', 'grouped' or 'external'... What I want to achieve: On the Thank you page, where it says " Thank you. Your order has been received. ". I want to show a particular text there if product is 'simple' and another text is product is variable or grouped or external, so something like: if (product->get_type() == 'simple') {// (for simple product) //show a text }else {// (for variable, grouped and

Get and use the product type in WooCommerce

人盡茶涼 提交于 2020-05-16 18:58:59
问题 I'm working on a project and I'm stuck in getting Woocommerce product types as 'simple', 'variable', 'grouped' or 'external'... What I want to achieve: On the Thank you page, where it says " Thank you. Your order has been received. ". I want to show a particular text there if product is 'simple' and another text is product is variable or grouped or external, so something like: if (product->get_type() == 'simple') {// (for simple product) //show a text }else {// (for variable, grouped and

If order has products on backorder - Split order and create new backorder from original

依然范特西╮ 提交于 2020-05-14 12:32:35
问题 I have the custom order status and it works. What I need help with here is looping through the order items and checking if any of them are on backorder and if so, take the backorder items out of the original order and create a new order and give the new order the Backorder status. The idea is to create the backorder if and only if there are items on backorder in the original order. add_action( 'woocommerce_checkout_order_processed', 'split_order_if_order_has_backorder_products', 10, 1 );

Add a dropdown Filter for a custom metakey on WooCommerce admin orders

倾然丶 夕夏残阳落幕 提交于 2020-05-14 01:26:06
问题 I have the below custom metakey which is an optin checkbox during checkout: //1. ADD OPT IN OPTION IN CHECKOUT AND SAVE IN THE ORDER // Add checkbox optin before T&Cs add_action( 'woocommerce_checkout_before_terms_and_conditions', 'marketing_opting_field' ); function marketing_opting_field() { echo '<div id="marketing_opting_field">'; woocommerce_form_field( 'marketing_opting', array( 'type' => 'checkbox', 'class' => array('input-checkbox'), 'label' => __('Yes, sign me up'), 'default' => 1, )