orders

WooCommerce Cancelled email notification Not sent when Order expires

China☆狼群 提交于 2019-12-21 20:54:27
问题 I have set up the stock in the woocommerce and configure the time for auto cancel the order after some minutes if payments are not done, it is working fine order is canceled after that period but not an email is generated. I have checked the email address and copy the template to my theme but not made any changes yet, To receive the emails, how To fix this issue? Note: New Order email is receiving but not this order canceled. Here is the status of Woocomerce: ### WordPress Environment ###

Include Custom Order Status in Woocommerce Orders sales reports

偶尔善良 提交于 2019-12-21 06:15:58
问题 I have a custom order status - In Progress. The code I have for it is below. It works great - but the orders with this custom order status are not being included in the standard Woo Sales Reports or the Woocommerce Status Dashboard Widget. Could someone please help me out and take a look and see how I can add to this snippet below so that the $ from this custom order status 'In Progress' are reflected in the Woo Sales Report $. // 1 New order status AFTER woo 2.2 IN PROGRESS add_action( 'init

WooCommerce admin order edit save post

十年热恋 提交于 2019-12-21 05:32:37
问题 In WooCommerce, when I submit, how to catch a custom select field added in the order edit admin pages? I have added this custom select field in the file class-wc-meta-box-order-data.php . I get this: But I dont know how to catch or to save $_POST['vendor'] I have tried to add $_POST['vendor'] in wp-admin/post.php , but it doesn't work . This is the code that I have added: <select class="wc-customer-search" id="customer_user" name="customer_user" data-placeholder="<?php esc_attr_e( 'Guest',

Change the user role on purchase for specific products when order status is completed

三世轮回 提交于 2019-12-20 02:49:09
问题 So I helped someone launch a site and they wanted a discounted product when someone purchased a specific product. I found a solution and implemented it and it worked at launch of the site and is no longer changing the role of customers when they purchase the products. I tried to get support from Woothemes and they don't support customization and want them to purchase a $129 extension to handle this. Does anyone out there have a solution for this that still works? Here is my code: // Update

WooCommerce - Custom notice on Thankyou and “My account” view order pages

柔情痞子 提交于 2019-12-19 11:43:49
问题 On WooCommerce I have a custom field days_manufacture for each product with different (integer) values. Also I Have this code that displays a message on cart page with the highest value of "days of manufacture" : add_action('woocommerce_before_cart', 'days_of_manufacture'); function days_of_manufacture() { $day_txt = ' ' . __('day', 'your_theme_domain_slug' ); $days_txt = ' ' . __('days', 'your_theme_domain_slug' ); $text = __('Your Order will be produced in: ', 'your_theme_domain_slug' );

WooCommerce - Custom notice on Thankyou and “My account” view order pages

北城以北 提交于 2019-12-19 11:43:09
问题 On WooCommerce I have a custom field days_manufacture for each product with different (integer) values. Also I Have this code that displays a message on cart page with the highest value of "days of manufacture" : add_action('woocommerce_before_cart', 'days_of_manufacture'); function days_of_manufacture() { $day_txt = ' ' . __('day', 'your_theme_domain_slug' ); $days_txt = ' ' . __('days', 'your_theme_domain_slug' ); $text = __('Your Order will be produced in: ', 'your_theme_domain_slug' );

Hiding prices based on visitor location backend bug in Woocommerce

一个人想着一个人 提交于 2019-12-19 11:25:54
问题 In my last question I asked how to hide prices to visitors outside the UK. Based off of an answer I used this code successfully add_filter( 'woocommerce_get_price_html', 'country_geolocated_based_hide_price', 10, 2 ); function country_geolocated_based_hide_price( $price, $product ) { if( get_current_user_id() > 0 ) { $country = WC()->customer->get_billing_country(); } else { // Get an instance of the WC_Geolocation object class $geo_instance = new WC_Geolocation(); // Get geolocated user geo

Displaying a coupon message on emails for completed order status only

纵然是瞬间 提交于 2019-12-19 04:58:11
问题 I've got that code that displays a coupon message in the email orders if the customer has not used any in this order. I would like to display that coupon message only on completed order instead on all mails. add_action( 'woocommerce_email_before_order_table', 'processing_order_mail_message', 20 ); function processing_order_mail_message( $order ) { if ( empty( $order->get_used_coupons() ) && ( $order->post_status == 'wc-on-hold' || $order->post_status == 'wc-processing' ) ) echo '<h2 id=

Output a product custom field in WooCommerce Order Admin Page (ACF)

送分小仙女□ 提交于 2019-12-19 04:43:11
问题 With WooCommerce, I'm using the Advanced Custom Fields plugin to keep a track of where I physically store each product. When an order comes in, I want to be able to look at the admin edit order page and see where the items are stored. So I can grab it to ship. Here's a picture of what I want to see: Hopefully, it makes sense. I just want to recall the individual product ACF variable (BinLocation) for each product on the Edit Order Admin Page for Wordpress. Any help on this? Thanks. 回答1:

Output a product custom field in WooCommerce Order Admin Page (ACF)

旧巷老猫 提交于 2019-12-19 04:43:09
问题 With WooCommerce, I'm using the Advanced Custom Fields plugin to keep a track of where I physically store each product. When an order comes in, I want to be able to look at the admin edit order page and see where the items are stored. So I can grab it to ship. Here's a picture of what I want to see: Hopefully, it makes sense. I just want to recall the individual product ACF variable (BinLocation) for each product on the Edit Order Admin Page for Wordpress. Any help on this? Thanks. 回答1: