orders

Save the sum of all specific order item custom fields as order meta data in WooCommerce

怎甘沉沦 提交于 2020-01-02 08:02:44
问题 Following my previous question " Save WooCommerce order item custom fields sum as a new meta data" , when an order is placed, some order item custom meta data quantity , assemblycost and calculated_field (which value is to quantity x assemblycost ) are saved. How can I save as custom order meta data the sum of all order items calculated_field values? For example, a sample order would look like so: Product A: assemblycost: 10 quantity: 2 calculated_field: 20 Product B: assemblycost: 15

Save the sum of all specific order item custom fields as order meta data in WooCommerce

◇◆丶佛笑我妖孽 提交于 2020-01-02 08:01:33
问题 Following my previous question " Save WooCommerce order item custom fields sum as a new meta data" , when an order is placed, some order item custom meta data quantity , assemblycost and calculated_field (which value is to quantity x assemblycost ) are saved. How can I save as custom order meta data the sum of all order items calculated_field values? For example, a sample order would look like so: Product A: assemblycost: 10 quantity: 2 calculated_field: 20 Product B: assemblycost: 15

WooCommerce Thankyou tracking code installation placement

我只是一个虾纸丫 提交于 2020-01-01 19:33:23
问题 I am new to Wordpress development and am trying to install a traffic junky tracking code on the thankyou.php page. My attempt has failed so far and I think it boils down to not understanding PHP well enough. The two tracking codes from trafficjunky that were available were HTML or PHP HTML: <img id="1000143661_tester" src="https://ads.trafficjunky.net/tj_ads_pt?a=1000143661&member_id=1000734841&cb=[RANDOM_NUMBER]&cti=[TRANSACTION_UNIQ_ID]&ctv=[VALUE_OF_THE_TRANSACTION]&ctd=[TRANSACTION

Add a fee to an order programmatically in Woocommerce 3

风流意气都作罢 提交于 2020-01-01 17:04:32
问题 I'm creating Woocommerce totals 'on-the-fly' as my cart items are imported from another CMS. Currently I am having trouble setting a custom 'fee' for each order , then marking the order as 'on-hold': $order->set_date_created($creation_tsz); $order->set_address( $address, 'billing' ); $order->set_address( $address, 'shipping' ); $order->set_currency('GBP'); $order->add_fee('Imported Total', $imported_total_here); $order->set_fee(); $order->calculate_totals(); $order->update_status('on-hold');

Add a fee to an order programmatically in Woocommerce 3

怎甘沉沦 提交于 2020-01-01 17:04:26
问题 I'm creating Woocommerce totals 'on-the-fly' as my cart items are imported from another CMS. Currently I am having trouble setting a custom 'fee' for each order , then marking the order as 'on-hold': $order->set_date_created($creation_tsz); $order->set_address( $address, 'billing' ); $order->set_address( $address, 'shipping' ); $order->set_currency('GBP'); $order->add_fee('Imported Total', $imported_total_here); $order->set_fee(); $order->calculate_totals(); $order->update_status('on-hold');

Customizing Woocommerce New Order email notification based on shipping method [closed]

一曲冷凌霜 提交于 2020-01-01 16:47:32
问题 Closed . This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 2 years ago . How can I edit the admin-new-order.php WooCommerce template to send conditionally some custom customer details based on shipping method? For example (for New Order email notification) : If the Order Shipping method is flat rate , I want to add some custom fields information to the customer details.

Customizing Woocommerce New Order email notification based on shipping method [closed]

廉价感情. 提交于 2020-01-01 16:45:27
问题 Closed . This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 2 years ago . How can I edit the admin-new-order.php WooCommerce template to send conditionally some custom customer details based on shipping method? For example (for New Order email notification) : If the Order Shipping method is flat rate , I want to add some custom fields information to the customer details.

Display usernames in Woocommerce Admin orders list custom column

和自甴很熟 提交于 2020-01-01 07:29:07
问题 I'm trying to make a custom Woocommerce order overview column which displays the WordPress user. This is the code which resides in the functions.php file: // ADDING A NEW COLUMN add_filter( 'manage_edit-shop_order_columns', 'k2i_extra_column_eldest_players', 20 ); function k2i_extra_column_eldest_players($columns) { $reordered_columns = array(); // Inserting columns to a specific location foreach( $columns as $key => $column){ $reordered_columns[$key] = $column; if( $key == 'order_status' ){

Add product short description to Woocommerce admin orders preview

我怕爱的太早我们不能终老 提交于 2019-12-30 10:59:08
问题 I'm trying to add my product short description into my order page as a new tab so we have an easier way to order products without having to go inside of them. I see currently SKU displays under the product ideally it would have a Product short description instead. This is what I've managed to get so far however no output of the short desc // Adds tab add_action( 'woocommerce_admin_order_item_headers', 'pd_admin_order_items_headers' ); function pd_admin_order_items_headers($order){ ?> <th

Reduce WooCommerce Item Inventory By Attribute Value

谁说胖子不能爱 提交于 2019-12-30 07:27:34
问题 I have a setup with Woocommerce "Variable Products" where the only variation is 'size' attribute: 15 grams, 100 grams, 250 grams. What I want to do is use that variation amount to pass to the Woo wc-stock-functions, so that when a product variation '15 grams' is purchased, the overall stock goes down by 15, not 1. Inside Woo, there is file wc-stock-functions (http://hookr.io/plugins/woocommerce/3.0.6/files/includes-wc-stock-functions/) - and this even gives a filter, woocommerce_order_item