orders

WooCommerce email IDs and order status change for email notifications

落爺英雄遲暮 提交于 2021-02-20 02:15:55
问题 I am trying to add a function that will log any email that is sent through order status changes. Is there a hook I can use that is triggered right before an order notification email is sent? 回答1: Updated All the available hooks responsible for triggering email notifications are located in WC_Emails init_transactional_emails() method and are action hooks: woocommerce_low_stock , woocommerce_no_stock , woocommerce_product_on_backorder , woocommerce_order_status_pending_to_processing ,

WooCommerce email IDs and order status change for email notifications

有些话、适合烂在心里 提交于 2021-02-20 02:12:37
问题 I am trying to add a function that will log any email that is sent through order status changes. Is there a hook I can use that is triggered right before an order notification email is sent? 回答1: Updated All the available hooks responsible for triggering email notifications are located in WC_Emails init_transactional_emails() method and are action hooks: woocommerce_low_stock , woocommerce_no_stock , woocommerce_product_on_backorder , woocommerce_order_status_pending_to_processing ,

WooCommerce email IDs and order status change for email notifications

独自空忆成欢 提交于 2021-02-20 02:12:24
问题 I am trying to add a function that will log any email that is sent through order status changes. Is there a hook I can use that is triggered right before an order notification email is sent? 回答1: Updated All the available hooks responsible for triggering email notifications are located in WC_Emails init_transactional_emails() method and are action hooks: woocommerce_low_stock , woocommerce_no_stock , woocommerce_product_on_backorder , woocommerce_order_status_pending_to_processing ,

Display a payment link for custom order statuses in Woocommerce email notifications

旧街凉风 提交于 2021-02-19 07:30:26
问题 I've been struggling for a while to get this to work. I need to show this payment link in my woocommerce emails, but only on certain (custom) order statuses. How is it done? Thanks :) printf( wp_kses( /* translators: %1s item is the name of the site, %2s is a html link */ __( '%2$s', 'woocommerce' ), array( 'a' => array( 'href' => array(), ), ) ), esc_html( get_bloginfo( 'name', 'display' ) ), '<a href="' . esc_url( $order->get_checkout_payment_url() ) . '">' . esc_html__( 'Click here to pay

WooCommerce custom report: Get orders with completed status

梦想的初衷 提交于 2021-02-17 02:50:08
问题 im making a custom reports for woocommerce im trying to add a report for all delivered orders here is what im doing $orders = wc_get_orders( array('numberposts' => -1) ); foreach( $orders as $order ){ if ( $order->get_status() === completed){ $order_data = $order->get_data(); // The Order data $items = $order->get_items(); foreach ( $items as $item ) { $product_name = $item->get_name(); $product_id = $item->get_product_id(); } $orders_completed .= '<tr><td>' . $order->get_order_number() . '<

Programmatically created WooCommerce order have no tax for new users

可紊 提交于 2021-02-15 06:51:08
问题 Im using Gravity forms to create an WooCommerce order programmatically. If an email added to the form already exists, it takes the shipping and billing from the users account. This works and it adds the VAT correctly. For a user that is not logged in, they add name, email, phone and country to the form, and the user is created automatically. The order is created, and the user is added. But in this case, the AT is not added and I have to manually recalculate the order for the VAT to be added.

Programmatically created WooCommerce order have no tax for new users

♀尐吖头ヾ 提交于 2021-02-15 06:50:13
问题 Im using Gravity forms to create an WooCommerce order programmatically. If an email added to the form already exists, it takes the shipping and billing from the users account. This works and it adds the VAT correctly. For a user that is not logged in, they add name, email, phone and country to the form, and the user is created automatically. The order is created, and the user is added. But in this case, the AT is not added and I have to manually recalculate the order for the VAT to be added.

Sorting order items via a hooked function in WooCommerce

…衆ロ難τιáo~ 提交于 2021-02-10 14:42:04
问题 In WooCommerce, I have a product attribute pa_location for "location" with which I sort my order items. When order items have the same location, I'd like to sort them by SKU. So, sort first by location and then by SKU. I looked to "PHP usort sorting multiple fields" but I am unable to figure out how it applies and would work for my function. I have this custom function that works to sort by pa_location , but cannot get it to also sort by _sku . I tried implementing some of the examples in the

Sorting order items via a hooked function in WooCommerce

守給你的承諾、 提交于 2021-02-10 14:39:03
问题 In WooCommerce, I have a product attribute pa_location for "location" with which I sort my order items. When order items have the same location, I'd like to sort them by SKU. So, sort first by location and then by SKU. I looked to "PHP usort sorting multiple fields" but I am unable to figure out how it applies and would work for my function. I have this custom function that works to sort by pa_location , but cannot get it to also sort by _sku . I tried implementing some of the examples in the

Change specific shipping method title on WooCommerce orders after checkout

不羁岁月 提交于 2021-02-10 14:35:27
问题 I have some custom fields in my shipping information that is not being displayed "properly" in the shipping information of orders under woocommerce -> orders -> order#. The cart and checkout pages are different via php code that changes a label. The cart image1 is the original\core label that is defined in shipping methods image2, this is being sent to the order information page. I would like the checkout information to show instead which is shown in image3. Image4 is how it currently looks