Automattic\WooCommerce\Internal\StockNotifications\Frontend

ProductPageIntegration::is_personalization_enabledpublic staticWC 1.0

Whether personalization is enabled.

Personalization includes checking if the user is already signed up and displaying the 'already signed up' message.

Method of the class: ProductPageIntegration{}

Returns

true|false. True if personalization is enabled, false otherwise.

Usage

$result = ProductPageIntegration::is_personalization_enabled(): bool;

ProductPageIntegration::is_personalization_enabled() code WC 10.3.6

public static function is_personalization_enabled(): bool {

	/**
	 * Filter whether personalization is enabled while rendering the form.
	 *
	 * @since 10.2.0
	 *
	 * @param bool $enabled Whether personalization is enabled.
	 * @return bool
	 */
	return (bool) apply_filters( 'woocommerce_customer_stock_notifications_personalization_enabled', false );
}