WordPress action hook

woocommerce_email_before_order_table

Defined by WooCommerce and fired by 39 plugins in total, running on 7.9M+ sites between them.

“Action hook to add custom content before order details in email.”

How to use woocommerce_email_before_order_table

It's an action: your callback runs at that point and receives 4 arguments. Nothing needs to be returned. Add this to your theme's functions.php or a small custom plugin:

functions.php
add_action( 'woocommerce_email_before_order_table', function( $order, $sent_to_admin, $plain_text, $email ) {
	// Your code runs here.
}, 10, 4 );

Argument names come from WooCommerce's source. Other plugins may pass different values: check the call in the plugin you're targeting below.

39 plugins that fire woocommerce_email_before_order_table

Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.

  1. WooCommerce icon WooCommerce7+ million installs do_action( 'woocommerce_email_before_order_table', $order, $sent_to_admin, $plain_text, $email ) templates/emails/email-order-details.php:49
  2. WooCommerce Stripe Payment Gateway icon WooCommerce Stripe Payment Gateway700,000+ installs do_action( 'woocommerce_email_before_order_table', $order, false, $plain_text, $email ) templates/emails/failed-preorder-authentication.php:32
  3. Kadence WooCommerce Email Designer icon Kadence WooCommerce Email Designer90,000+ installs do_action( 'woocommerce_email_before_order_table', $order, true, false ) templates/wcmp/vendor-new-order.php:30
  4. Custom Order Status Manager for WooCommerce icon Custom Order Status Manager for WooCommerce30,000+ installs do_action( 'woocommerce_email_before_order_table', $order, true, false, $email ) templates/emails/admin-order-status-email.php:17
  5. Email Templates Customizer and Designer for WordPress and WooCommerce icon Email Templates Customizer and Designer for WordPress and WooCommerce20,000+ installs do_action( 'woocommerce_email_before_order_table', $order, true, false ) templates/wcmp/vendor-new-order.php:30
  6. Mailonix icon Mailonix20,000+ installs do_action( 'woocommerce_email_before_order_table', $this->order, false, false, '' ) includes/email-render.php:928
  7. WCFM Marketplace icon WCFM Marketplace10,000+ installs do_action( 'woocommerce_email_before_order_table', $order, true, false, $email ) views/emails/plain/store-new-order.php:82
  8. WebToffee eCommerce Marketing Automation icon WebToffee eCommerce Marketing Automation10,000+ installs do_action( 'woocommerce_email_before_order_table', $order, $sent_to_admin, $plain_text, $email ) includes/wt-woo-templates/emails/email-order-details.php:30
  9. NP Quote Request for WooCommerce icon NP Quote Request for WooCommerce8,000+ installs do_action( 'woocommerce_email_before_order_table', $order, $sent_to_admin, $plain_text, $email ) woocommerce/emails/admin-new-rfq.php:30
  10. Donation Platform for WooCommerce: Fundraising & Donation Management icon Donation Platform for WooCommerce: Fundraising & Donation Management6,000+ installs do_action( 'woocommerce_email_before_order_table', $order, $sent_to_admin, $plain_text, $email ) includes/wc-templates/emails/email-order-details.php:53
  11. Deposits & Partial Payments for WooCommerce icon Deposits & Partial Payments for WooCommerce5,000+ installs do_action( 'woocommerce_email_before_order_table', $order, $sent_to_admin, $plain_text ) templates/emails/plain/customer-order-deposit-paid.php:12
  12. Quotes for WooCommerce icon Quotes for WooCommerce4,000+ installs do_action( 'woocommerce_email_before_order_table', $order, $sent_to_admin, $plain_text, $email ) templates/emails/new-quote-request-sent-customer.php:37
  13. WC Vendors icon WC Vendors3,000+ installs do_action( 'woocommerce_email_before_order_table', $order, true ) templates/emails/notify-vendor-shipped.php:23
  14. WP Crowdfunding icon WP Crowdfunding2,000+ installs do_action( 'woocommerce_email_before_order_table', $order, $sent_to_admin, $plain_text, $email ) woocommerce/emails/email-order-details.php:22
  15. Order Approval for Woocommerce icon Order Approval for Woocommerce1,000+ installs do_action( 'woocommerce_email_before_order_table', $order, true, false, $email ) templates/emails/plain/store-new-preorder.php:98
  16. Partial Shipment for WooCommerce icon Partial Shipment for WooCommerce1,000+ installs do_action( 'woocommerce_email_before_order_table', $order, $sent_to_admin, $plain_text, $email ) emails/email-partial-order-details.php:25
  17. WP Hotel Booking WooCommerce icon WP Hotel Booking WooCommerce1,000+ installs do_action( 'woocommerce_email_before_order_table', $order, $sent_to_admin, $plain_text, $email ) templates/woocommerce/emails/email-order-details.php:22
  18. Sublium Subscriptions icon Sublium Subscriptions700+ installs do_action( 'woocommerce_email_before_order_table', $order, $sent_to_admin, $plain_text, $email ) templates/emails/order-items.php:23
  19. MarketKing icon MarketKing700+ installs do_action( 'woocommerce_email_before_order_table', $order, $sent_to_admin, $plain_text, $email ) public/templates/email-order-details.php:97
  20. PDF Invoice for WooCommerce + Drag and Drop Template Builder icon PDF Invoice for WooCommerce + Drag and Drop Template Builder500+ installs do_action( 'woocommerce_email_before_order_table', $order, $sent_to_admin, $plain_text, $email ) woocommerce/templates/emails/email-order-items.php:23
  21. WooBooster Partial COD for WooCommerce icon WooBooster Partial COD for WooCommerce400+ installs do_action( 'woocommerce_email_before_order_table', $order, $sent_to_admin, $plain_text, $email ) templates/emails/email-order-details.php:42
  22. Paguelofacil Checkout for Woocommerce icon Paguelofacil Checkout for Woocommerce300+ installs do_action( 'woocommerce_email_before_order_table', 'add_order_email_instructions_lk', 10, 3 ) class-gateway.php:571
  23. Email Customizer for WooCommerce icon Email Customizer for WooCommerce200+ installs do_action( 'woocommerce_email_before_order_table', $order, $sent_to_admin, $plain_text, $email ) templates/order_items.php:18
  24. Hotel Booking for WooCommerce icon Hotel Booking for WooCommerce100+ installs do_action( 'woocommerce_email_before_order_table', $order, $sent_to_admin, $plain_text, $email ) templates/emails/email-booking-details.php:42
  25. Split Pay icon Split Pay100+ installs do_action( 'woocommerce_email_before_order_table', $order, $sent_to_admin, $plain_text, $email ) wc-templates/emails/email-order-details.php:29
  26. SDP Custom Order Status for WooCommerce icon SDP Custom Order Status for WooCommerce100+ installs do_action( 'woocommerce_email_before_order_table', $this->object, in_array ('admin', $this->notificaciones), $this->plain, $this ) src/notificacion.php:206
  27. MonstaManagement presents WebMonsta! icon MonstaManagement presents WebMonsta!70+ installs do_action( 'woocommerce_email_before_order_table', $order, $sent_to_admin, $plain_text, $email ) templates/emails/custom-email-order-details.php:21
  28. OpenPOS Lite icon OpenPOS Lite60+ installs do_action( 'woocommerce_email_before_order_table', $order, $sent_to_admin, $plain_text, $email ) templates/emails/email-order-details.php:22
  29. Boopis WooCommerce RFQ icon Boopis WooCommerce RFQ60+ installs do_action( 'woocommerce_email_before_order_table', $order, $sent_to_admin, $plain_text, $email ) templates/emails/email-quote-details.php:7
  30. Email Templates Customizer for WooCommerce + Drag And Drop Template Builder icon Email Templates Customizer for WooCommerce + Drag And Drop Template Builder40+ installs do_action( 'woocommerce_email_before_order_table', $order, $sent_to_admin, $plain_text, $email ) woocommerce/shortcodes.php:568
  31. Virfice icon Virfice30+ installs do_action( 'woocommerce_email_before_order_table', $order, $sent_to_admin, $plain_text, $email ) src/Utils.php:678
  32. Marketing 360® Payments for WooCommerce icon Marketing 360® Payments for WooCommerce30+ installs do_action( 'woocommerce_email_before_order_table', $order, false, $plain_text, $email ) templates/emails/failed-preorder-authentication.php:30
  33. CodesWholesale.com for WooCommerce icon CodesWholesale.com for WooCommerce10+ installs do_action( 'woocommerce_email_before_order_table', $order, $sent_to_admin, $plain_text ) templates/emails/customer-completed-order.php:8
  34. Zirkel Virtual IBAN for WooCommerce icon Zirkel Virtual IBAN for WooCommerceFewer than 10 installs do_action( 'woocommerce_email_before_order_table', $order, false, false, $email ) templates/emails/customer-awaiting-transfer.php:31
  35. SaleSaver icon SaleSaverFewer than 10 installs do_action( 'woocommerce_email_before_order_table', $order, $sent_to_admin, $plain_text, $email ) templates/emails/salesaver-pending-payment.php:34
  36. Flowbyte Store Booster icon Flowbyte Store BoosterFewer than 10 installs do_action( 'woocommerce_email_before_order_table', null, false, false, $this ) modules/back-in-stock/class-email.php:90
  37. PayRivet Payments with Stripe for WooCommerce icon PayRivet Payments with Stripe for WooCommerceFewer than 10 installs do_action( 'woocommerce_email_before_order_table', $order, false, $plain_text, $email ) templates/emails/failed-preorder-authentication.php:33
  38. Anticipo icon AnticipoFewer than 10 installs do_action( 'woocommerce_email_before_order_table', $order, $sent_to_admin, false, $email ) templates/emails/anticipo-po-email.php:87
  39. AAkron Personalization icon AAkron PersonalizationFewer than 10 installs do_action( 'woocommerce_email_before_order_table', $order, $sent_to_admin, $plain_text, $email ) admin/woocommerce/emails/email-order-details.php:21

Need a customisation built on this hook?

Tell us what you want to change and which plugin it's for. We'll write it, test it and send it back as a small plugin.