Automattic\WooCommerce\Internal\Admin\Notes

ScheduledUpdatesPromotion::is_applicablepublic staticWC 1.0

Should this note exist?

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

Хуков нет.

Возвращает

true|false.

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

$result = ScheduledUpdatesPromotion::is_applicable();

Код ScheduledUpdatesPromotion::is_applicable() WC 10.5.2

public static function is_applicable() {
	if ( ! Features::is_enabled( 'analytics-scheduled-import' ) ) {
		return false;
	}

	// Get the current option value.
	// Note: get_option() returns false when option doesn't exist.
	$immediate_import = get_option( self::OPTION_NAME, false );

	// Only show to existing sites (false/not set) that haven't migrated yet.
	// New sites have the option set during onboarding, so they won't see this.
	if ( false !== $immediate_import ) {
		return false;
	}

	return true;
}