orders

I'm collecting meta key data, and I want to display it in the WordPress dashboard

我的梦境 提交于 2020-04-18 05:46:03
问题 I found, and modified this for my needs, and put it in my functions.php: add_filter( 'manage_edit-shop_order_columns', 'MY_COLUMNS_FUNCTION' ); function MY_COLUMNS_FUNCTION( $columns ) { $new_columns = ( is_array( $columns ) ) ? $columns : array(); unset( $new_columns[ 'order_actions' ] ); //edit this for your column(s) //all of your columns will be added before the actions column $new_columns['dname'] = 'Dogs Name'; $new_columns['additional_allergies'] = 'Allergies'; //stop editing $new

Restrict user role to change only some order statuses in Woocommerce [closed]

别说谁变了你拦得住时间么 提交于 2020-04-06 20:34:07
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed last year . I would like to restrict access by role to certain order statuses from the dropdown list in woocommerce. I have tried in functions.php child theme the code on Restrict woocommerce order status by role but cannot get it to work and do not have enough rep to post a comment. https:/

Restrict user role to change only some order statuses in Woocommerce [closed]

我只是一个虾纸丫 提交于 2020-04-06 20:33:26
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed last year . I would like to restrict access by role to certain order statuses from the dropdown list in woocommerce. I have tried in functions.php child theme the code on Restrict woocommerce order status by role but cannot get it to work and do not have enough rep to post a comment. https:/

Custom action button in WooCommerce admin orders with an external api call

一个人想着一个人 提交于 2020-03-25 18:01:19
问题 I have created a function to add a custom action button on the admin order list, this is to cross-check the actual payment status with payment gateway. add_filter( 'woocommerce_admin_order_actions', 'add_custom_order_status_actions_button', 100, 2 ); function add_custom_order_status_actions_button( $actions, $order ) { if ( $order->has_status( array( 'pending' ) ) ) { //if ( $order->has_status( array( 'on-hold' ) ) ) { $my_site_options = get_option('pay_settings'); $mpay_adr = "https://www

Change order status when order has backorder items in it

 ̄綄美尐妖づ 提交于 2020-03-20 12:48:20
问题 In WooCommerce, How to change the on-hold order status to something else, if this order has back-ordered items in it? I have tried to use a custom function hooked in woocommerce_order_status_on-hold action hook without success. Can anyone help me on this issue? Thanks. 回答1: function mysite_hold($order_id) { $order = new WC_Order($order_id); $items = $order->get_items(); $backorder = FALSE; foreach ($items as $item) { if ($item['Backordered']) { $backorder = TRUE; break; } } if($backorder){

Change order status when order has backorder items in it

久未见 提交于 2020-03-20 12:48:12
问题 In WooCommerce, How to change the on-hold order status to something else, if this order has back-ordered items in it? I have tried to use a custom function hooked in woocommerce_order_status_on-hold action hook without success. Can anyone help me on this issue? Thanks. 回答1: function mysite_hold($order_id) { $order = new WC_Order($order_id); $items = $order->get_items(); $backorder = FALSE; foreach ($items as $item) { if ($item['Backordered']) { $backorder = TRUE; break; } } if($backorder){

Get processing status orders count in WooCommerce?

大城市里の小女人 提交于 2020-02-25 07:27:22
问题 I want to get the processing order count in WooCommerce. I'm using the following code in the Code Snippet plugin but that is working. if( !function_exists( 'wc_processing_order_count' ) ) { require_once '../plugins/woocommerce/includes/wc-order-functions.php'; } // NOTICE! Understand what this does before running. $result = wc_processing_order_count(); It's returning nothing. 回答1: This custom function use a very light SQL query to get the orders count from a specific status: function get

Allow customer to change the order status in WooCommerce My account

醉酒当歌 提交于 2020-02-23 04:05:55
问题 Looking to create a custom order process that looks like this: Customer adds item to cart During Checkout Process customer uploads design to order On Checkout payment is verified, but not captured After design is finalized by the company, they upload the proof for customer review the customer reviews proof on their dashboard, and clicks a button that processes the order and captures payment I have figured out everything i need to make this happen except for how to allow the customer to change

How to set minimum purchase order amount

大兔子大兔子 提交于 2020-02-03 04:51:20
问题 When customer places an order, how to set minimum order amount? i.e) Total amount of order not below than $500. I know how to get total order amount. But I don't know where to place that code and where to check sOrderId = Mage::getSingleton('checkout/session')->getLastOrderId(); $oOrder = Mage::getModel('sales/order')->load($sOrderId); if($oOrder >=$500) { ..... } If customer has purchased total less than $500, they won't allow to checkout at the cart. 回答1: Login as admin, then go to System-

How to set minimum purchase order amount

旧巷老猫 提交于 2020-02-03 04:51:07
问题 When customer places an order, how to set minimum order amount? i.e) Total amount of order not below than $500. I know how to get total order amount. But I don't know where to place that code and where to check sOrderId = Mage::getSingleton('checkout/session')->getLastOrderId(); $oOrder = Mage::getModel('sales/order')->load($sOrderId); if($oOrder >=$500) { ..... } If customer has purchased total less than $500, they won't allow to checkout at the cart. 回答1: Login as admin, then go to System-