orders

In Woocommerce order page, create a custom text field related to order id

本秂侑毒 提交于 2020-07-09 08:50:35
问题 In this code comes come an answer to one of my previous questions, and the custom url data is related to the user data. I need that the custom url have to be different, related to the order id (ex. 100 order, 100 different custom url, one per order's page). // Display user custom field add_action( 'woocommerce_order_details_before_order_table', 'add_user_custom_url_field_to_order' ); function add_user_custom_url_field_to_order( $order ) { global $current_user; $custom_url = get_user_meta(

In Woocommerce order page, create a custom text field related to order id

穿精又带淫゛_ 提交于 2020-07-09 08:48:28
问题 In this code comes come an answer to one of my previous questions, and the custom url data is related to the user data. I need that the custom url have to be different, related to the order id (ex. 100 order, 100 different custom url, one per order's page). // Display user custom field add_action( 'woocommerce_order_details_before_order_table', 'add_user_custom_url_field_to_order' ); function add_user_custom_url_field_to_order( $order ) { global $current_user; $custom_url = get_user_meta(

Change product category once the order status get completed

ⅰ亾dé卋堺 提交于 2020-07-07 15:01:11
问题 I want to apply new category to product once the order status get "completed" in WooCommerce. Let's say that the Product is in (category A) and I want to apply (category B) on order status "completed". Is there any way to do this? I found couple of tutorials but don't know how to combine them: https://wordpress.org/support/topic/automatically-add-posts-to-a-category-conditionally https://wordpress.org/support/topic/woocommerce-on-order-complete-insert-quantity-data-into-custom-database-table

Change product category once the order status get completed

懵懂的女人 提交于 2020-07-07 14:55:51
问题 I want to apply new category to product once the order status get "completed" in WooCommerce. Let's say that the Product is in (category A) and I want to apply (category B) on order status "completed". Is there any way to do this? I found couple of tutorials but don't know how to combine them: https://wordpress.org/support/topic/automatically-add-posts-to-a-category-conditionally https://wordpress.org/support/topic/woocommerce-on-order-complete-insert-quantity-data-into-custom-database-table

Change product category once the order status get completed

僤鯓⒐⒋嵵緔 提交于 2020-07-07 14:55:09
问题 I want to apply new category to product once the order status get "completed" in WooCommerce. Let's say that the Product is in (category A) and I want to apply (category B) on order status "completed". Is there any way to do this? I found couple of tutorials but don't know how to combine them: https://wordpress.org/support/topic/automatically-add-posts-to-a-category-conditionally https://wordpress.org/support/topic/woocommerce-on-order-complete-insert-quantity-data-into-custom-database-table

Display custom column with custom user meta on WooCommerce order admin list

≡放荡痞女 提交于 2020-07-07 12:20:20
问题 In a bit of a quandary here. I've been trying for a couple of days now to get my data, that I collected from a custom field in WooCommerce registration form to insert into user meta in database. The code for the form is: //Addition of morello Account Number to reg page add_action( 'woocommerce_register_form', 'add_register_form_field' ); function add_register_form_field(){ woocommerce_form_field( 'morello_account_number', array( 'type' => 'text', 'required' => true, // required field? 'label'

Change order status for virtual, downloadable, free or backorder products in WooCommerce

徘徊边缘 提交于 2020-06-29 04:27:49
问题 i try to slightly modify with +1 check for plugin located here So , for all Virtual Downloadable Free (price=0,00) & on Backorder products I want Woocommerce to set order status 'Processing' the result I have with code below - Woocommerce to set order status 'Pending Payment' Are there any ideas how to switch it to 'Processing': add_action('woocommerce_checkout_order_processed', 'handmade_woocommerce_order'); function handmade_woocommerce_order( $order_id ) { $order = wc_get_order($order_id);

Change order status for virtual, downloadable, free or backorder products in WooCommerce

試著忘記壹切 提交于 2020-06-29 04:27:18
问题 i try to slightly modify with +1 check for plugin located here So , for all Virtual Downloadable Free (price=0,00) & on Backorder products I want Woocommerce to set order status 'Processing' the result I have with code below - Woocommerce to set order status 'Pending Payment' Are there any ideas how to switch it to 'Processing': add_action('woocommerce_checkout_order_processed', 'handmade_woocommerce_order'); function handmade_woocommerce_order( $order_id ) { $order = wc_get_order($order_id);

Change “Shipping” label in Woocommerce email table totals?

走远了吗. 提交于 2020-06-25 05:56:32
问题 I am customizing the order email template in WooCommerce and need to change the title of "Shipping" to "Delivery," as well as change "Shipping address" to "Delivery address". I tried a plugin, "Say What" that would change the text but it did not work. There is a loop that handles all of this information. Woocommerce email template This is the code on line 52 in the "email-order-details.php" page. if ( $totals = $order->get_order_item_totals() ) { $i = 0; foreach ( $totals as $total ) { $i++;

Change “Shipping” label in Woocommerce email table totals?

依然范特西╮ 提交于 2020-06-25 05:56:12
问题 I am customizing the order email template in WooCommerce and need to change the title of "Shipping" to "Delivery," as well as change "Shipping address" to "Delivery address". I tried a plugin, "Say What" that would change the text but it did not work. There is a loop that handles all of this information. Woocommerce email template This is the code on line 52 in the "email-order-details.php" page. if ( $totals = $order->get_order_item_totals() ) { $i = 0; foreach ( $totals as $total ) { $i++;