woocommerce_should_send_backorder_notification
Determine if the current product should trigger a backorder notification.
Usage
add_filter( 'woocommerce_should_send_backorder_notification', 'wp_kama_woocommerce_should_send_backorder_notification_filter', 10, 2 );
/**
* Function for `woocommerce_should_send_backorder_notification` filter-hook.
*
* @param bool $send Whether the backorder notification should be sent.
* @param int $product_id The backordered product id.
*
* @return bool
*/
function wp_kama_woocommerce_should_send_backorder_notification_filter( $send, $product_id ){
// filter...
return $send;
}
- $send(true|false)
- Whether the backorder notification should be sent.
- $product_id(int)
- The backordered product id.
Changelog
| Since 11.0.0 | Introduced. |
Where the hook is called
woocommerce_should_send_backorder_notification
woocommerce/includes/class-wc-emails.php 1218
if ( false === apply_filters( 'woocommerce_should_send_backorder_notification', true, $args['product']->get_id() ) ) {