Automattic\WooCommerce\Internal\Admin\Notes
ScheduledUpdatesPromotion::is_applicable
Should this note exist?
Method of the class: ScheduledUpdatesPromotion{}
No Hooks.
Returns
true|false.
Usage
$result = ScheduledUpdatesPromotion::is_applicable();
ScheduledUpdatesPromotion::is_applicable() ScheduledUpdatesPromotion::is applicable code WC 10.6.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;
}