woocommerce_should_send_review_request filter-hookWC 10.8.0

Filter whether to schedule the review-request email for a given order.

Return false to opt a specific order out of the automated email while leaving the email enabled store-wide.

Usage

add_filter( 'woocommerce_should_send_review_request', 'wp_kama_woocommerce_should_send_review_request_filter', 10, 2 );

/**
 * Function for `woocommerce_should_send_review_request` filter-hook.
 * 
 * @param bool     $should_send Whether to schedule the email.
 * @param WC_Order $order       The order being processed.
 *
 * @return bool
 */
function wp_kama_woocommerce_should_send_review_request_filter( $should_send, $order ){

	// filter...
	return $should_send;
}
$should_send(true|false)
Whether to schedule the email.
Default: true
$order(WC_Order)
The order being processed.

Changelog

Since 10.8.0 Introduced.

Where the hook is called

Scheduler::handle_woocommerce_order_status_completed()
woocommerce_should_send_review_request
woocommerce/src/Internal/OrderReviews/Scheduler.php 151
$should_send = (bool) apply_filters( 'woocommerce_should_send_review_request', true, $order );

Where the hook is used in WooCommerce

Usage not found.