Automattic\WooCommerce\Internal\Admin
Events::is_merchant_email_notifications_enabled
Checks if merchant email notifications are enabled.
Method of the class: Events{}
No Hooks.
Returns
true|false. Whether merchant email notifications are enabled.
Usage
// protected - for code of main (parent) or child class $result = $this->is_merchant_email_notifications_enabled();
Events::is_merchant_email_notifications_enabled() Events::is merchant email notifications enabled code WC 10.3.6
protected function is_merchant_email_notifications_enabled() {
// Check if the feature flag is disabled.
if ( get_option( 'woocommerce_merchant_email_notifications', 'no' ) !== 'yes' ) {
return false;
}
// All checks have passed.
return true;
}