WC_Email_Customer_Abandoned_Cart_Recovery::is_suppressedpublic staticWC 11.0.0

Whether the recovery email should be skipped.

The merchant's own opt-out lives on the enabled toggle in Settings → Emails, which trigger() checks via is_enabled(). This method is the additional gate partner plugins (AutomateWoo, MailPoet, etc.) can hook into to short-circuit the send without touching the merchant's saved settings. Static so the manual-send handler and the scheduler can call it without instantiating the email class.

Метод класса: WC_Email_Customer_Abandoned_Cart_Recovery{}

Возвращает

true|false.

Использование

$result = WC_Email_Customer_Abandoned_Cart_Recovery::is_suppressed(): bool;

Список изменений

С версии 11.0.0 Введена.

Код WC_Email_Customer_Abandoned_Cart_Recovery::is_suppressed() WC 11.0.1

public static function is_suppressed(): bool {
	/**
	 * Filter to suppress the abandoned cart recovery email send.
	 *
	 * Partner plugins that handle abandoned cart recovery themselves can
	 * return true here to prevent core from sending a duplicate email.
	 *
	 * @since 11.0.0
	 *
	 * @param bool $suppress Default false.
	 */
	return (bool) apply_filters( 'woocommerce_abandoned_cart_recovery_suppress', false );
}