WordPress filter hook

woocommerce_email_downloads_columns

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

“Filter the columns of the order downloads table.”

How to use woocommerce_email_downloads_columns

It's a filter: your callback receives the value and 1 more argument, and must return the (changed) value. Add this to your theme's functions.php or a small custom plugin:

functions.php
add_filter( 'woocommerce_email_downloads_columns', function( $value, $order ) {
	// Change $value here.
	return $value;
}, 10, 2 );

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

8 plugins that fire woocommerce_email_downloads_columns

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

  1. WooCommerce icon WooCommerce7+ million installs apply_filters( 'woocommerce_email_downloads_columns', array( 'download-product' => __( 'Product', 'woocommerce' ), 'download-expires' => __( 'Expires', 'woocommerce' ), 'download-file' => __( 'Download', 'woocommerce' ), ), $order ) includes/class-wc-emails.php:590
  2. FunnelKit Automations icon FunnelKit Automations20,000+ installs apply_filters( 'woocommerce_email_downloads_columns', array( 'download-product' => __( 'Product', 'woocommerce' ), 'download-expires' => __( 'Expires', 'woocommerce' ), 'download-file' => __( 'Download', 'woocommerce' ), ) ) templates/order-table.php:58
  3. PDF Invoice for WooCommerce + Drag and Drop Template Builder icon PDF Invoice for WooCommerce + Drag and Drop Template Builder500+ installs apply_filters( 'woocommerce_email_downloads_columns', array( 'download-product' => __('Product', 'woocommerce'), 'download-expires' => __('Expires', 'woocommerce'), 'download-file' => __('Download', 'woocommerce'), ) ) woocommerce/templates/emails/email-downloads.php:23
  4. SDP Custom Order Status for WooCommerce icon SDP Custom Order Status for WooCommerce100+ installs apply_filters( 'woocommerce_email_downloads_columns', [ 'download-product' => esc_html__('Product', 'woocommerce'), 'download-expires' => esc_html__('Expires', 'woocommerce'), 'download-file' => esc_html__('Download', 'woocommerce'), ] ) src/notificacion.php:350
  5. ProductBoxes icon ProductBoxes40+ installs apply_filters( 'woocommerce_email_downloads_columns', array( 'download-product' => __( 'Product', 'productboxes-mix-and-match-box-builder' ), 'download-expires' => __( 'Expires', 'productboxes-mix-and-match-box-builder' ), 'download-file' => __( 'Download', 'productboxes-mix-and-match-box-builder' ), ), $order ) includes/cart/class-order-downloads.php:55
  6. Email Templates Customizer for WooCommerce + Drag And Drop Template Builder icon Email Templates Customizer for WooCommerce + Drag And Drop Template Builder40+ installs apply_filters( 'woocommerce_email_downloads_columns', array( 'download-product' => __( 'Product', 'woocommerce' ), 'download-expires' => __( 'Expires', 'woocommerce' ), 'download-file' => __( 'Download', 'woocommerce' ), ) ) templates/woocommerce/emails/email-downloads.php:22
  7. Kramar icon KramarFewer than 10 installs apply_filters( 'woocommerce_email_downloads_columns', [ 'download-product' => __( 'Product', 'kramar' ), 'download-expires' => __( 'Expires', 'kramar' ), 'download-file' => __( 'Download', 'kramar' ), ], $order ) modules/email/class-email-manager.php:3219
  8. Vezaro icon VezaroFewer than 10 installs apply_filters( 'woocommerce_email_downloads_columns', array( 'download-product' => esc_html__( 'Product', 'vezaro-pdf-vouchers-for-woocommerce' ), 'download-expires' => esc_html__( 'Expires', 'vezaro-pdf-vouchers-for-woocommerce' ), 'download-file' => esc_html__( 'Download', 'vezaro-pdf-vouchers-for-woocommerce' ), ) ) includes/public/woo-vou-public-functions.php:1992

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.