woocommerce

Add or replace a variation fields into a WYSIWYG editor field in Woocommerce

╄→尐↘猪︶ㄣ 提交于 2021-02-07 10:45:24
问题 I'm trying to figure out how I can turn a Woocommerce Variation Subscription product text field into a WYSIWYG editor. How it looks now: As you can see I put code into that field to updates its appearance, but that isn't going to work for my client who knows no code. How can I add a text editor to this field? 回答1: It's not possible to replace the variation description, but it can be hidden (in case of need). It's possible to add a WYSIWYG editor to Woocommerce variations. But it will not work

Custom WooCommerce datepicker checkout field saved and displayed on orders and emails

扶醉桌前 提交于 2021-02-07 10:43:10
问题 I have added a new custom datepicker field on the WooCommerce checkout page. I am using Enabling a date-picker in Woocommerce checkout fields . All it's OK On checkout page. But now I really don't know how can I save and add this new field on the order notes. Any help is appreciated. 回答1: Section 1 The following will display a custom datepicker field on checkout, it will validate the field and save It. The chosen date will be displayed on admin order, customer order and emails To include this

Get the Order ID in Woocommerce order received page as shortcode

℡╲_俬逩灬. 提交于 2021-02-07 10:24:36
问题 I want to have WooCommerce Order ID's referenced as a shortcode to be easily be used in the Order received page to generate dynamic links. function my_order_id( $atts ) { echo $order->get_id(); } add_shortcode( 'my_order_id', 'my_order_id'); 回答1: Here is the way to get the Order ID in "Order received" (thankyou) page as a shortcode: function get_order_id_thankyou( $atts ) { // Only in thankyou "Order-received" page if( ! is_wc_endpoint_url( 'order-received' ) ) return; // Exit global $wp; //

Keep and get order status history with their time stamps in Woocommerce 3

拥有回忆 提交于 2021-02-07 10:24:09
问题 I want to save the order status history for all orders on woocommerce. e.g If the order status is changed from pending to processing the previous status along with its timestamp should be saved so that user can view their order status history through this page. I have done some research but I couldn't find a way to do this. I would like to hear the suggestions. The order tracking is done using a custom plugin. I am retrieving the order details using the following $order object $order = wc_get

Keep and get order status history with their time stamps in Woocommerce 3

﹥>﹥吖頭↗ 提交于 2021-02-07 10:23:24
问题 I want to save the order status history for all orders on woocommerce. e.g If the order status is changed from pending to processing the previous status along with its timestamp should be saved so that user can view their order status history through this page. I have done some research but I couldn't find a way to do this. I would like to hear the suggestions. The order tracking is done using a custom plugin. I am retrieving the order details using the following $order object $order = wc_get

<style> tag has been removed from woocommerce email templates

拥有回忆 提交于 2021-02-07 10:19:41
问题 I'm trying to add a 'style' tag inside my woocommerce email templates, in order to include a font-face attribute, with no success. What I already tried is to: Add it directly in the template file (ex. email-header.php) Add it in 'woocommerce_email_header' filter add_action('woocommerce_email_header', 'add_style_tag_to_email', 10); function add_style_tag_to_email() { echo ' <style type="text/css"> @font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 300; src: local(

Save and display order item custom meta data in Woocommerce

倾然丶 夕夏残阳落幕 提交于 2021-02-07 09:52:36
问题 I have some custom code was working perfectly and since I have updated Woocommerce to version 3.5.2 it is not working anymore, not sure if it is because I changed the wordpress theme or because because plugin updates. My problem is that the value of the custom fields doesn't appear on the order page from woocommerce or even on the order email. Here is the related code: // Display Fields using WooCommerce Action Hook add_action('woocommerce_product_options_general_product_data', 'woocom

Save and display order item custom meta data in Woocommerce

别说谁变了你拦得住时间么 提交于 2021-02-07 09:51:47
问题 I have some custom code was working perfectly and since I have updated Woocommerce to version 3.5.2 it is not working anymore, not sure if it is because I changed the wordpress theme or because because plugin updates. My problem is that the value of the custom fields doesn't appear on the order page from woocommerce or even on the order email. Here is the related code: // Display Fields using WooCommerce Action Hook add_action('woocommerce_product_options_general_product_data', 'woocom

Save and display order item custom meta data in Woocommerce

我是研究僧i 提交于 2021-02-07 09:51:30
问题 I have some custom code was working perfectly and since I have updated Woocommerce to version 3.5.2 it is not working anymore, not sure if it is because I changed the wordpress theme or because because plugin updates. My problem is that the value of the custom fields doesn't appear on the order page from woocommerce or even on the order email. Here is the related code: // Display Fields using WooCommerce Action Hook add_action('woocommerce_product_options_general_product_data', 'woocom

Trigger Woocommerce outgoing email based on an order note

时光毁灭记忆、已成空白 提交于 2021-02-07 09:49:51
问题 Is it possible to trigger an outgoing email based on an added order note within WooCommerce? We've integrated with a stock control system (Mintsoft) who basically send us back the tracking ID via order notes (all linked up via the REST API) I've managed to hook into the content of the note based on the text inside, as the order object contains pretty much everything you could want - however it's out of scope at the point the usual "completed" mail goes out, meaning a template change is out of