Woocomerce add info after order email prouct item

you can do this with a differnent woocommerce hook: woocommerce_order_item_meta_end ($item_id, $item, $order, $plain_text) use it similarly to the cart filter above. For a visual representation if you want the additional information somewhere else see this link: https://businessbloomer.com/woocommerce-visual-hook-guide-emails/ You can also always go right to the source and see all the hooks/filters/actions in woocommerce: https://docs.woocommerce.com/wc-apidocs/hook-docs.html … Read more

How to call code when adding WooCommerce menu items via woocommerce_account_menu_items

One needs to create an action hook ‘woocommerce_account_[myendpoint]_endpoint’: add_action(‘woocommerce_account_’ . $endpoint . ‘_endpoint’, ‘my_endpoint_content’); function my_endpoint_content() { //content goes here echo ‘My content goes here’; } http://hookr.io/actions/woocommerce_account_key_endpoint/ So, putting a few different sources together, to add a new menu item to the Woocommerce My Account dashboard one needs something like: <?php add_filter(‘woocommerce_account_menu_items’, ‘add_my_menu_items’); function add_my_menu_items($items) … Read more

Woocommerce Canceled Order Notification email to admin

Was the order moved from Pending to Cancelled? WooCommerce no longer sends an email to the admin for that (I think the logic is that a lot of bot-created Pending orders were automatically cancelled and giving admins too many notifications). You can restore the old behavior by hooking woocommerce_order_status_pending_to_cancelled_notification and calling WC()->mailer()->get_emails()[‘WC_Email_Cancelled_Order’]->trigger with the order … Read more