Automattic\WooCommerce\Internal\Admin\Notes

MagentoMigration::possibly_add_note()public staticWC 1.0

Add the note if it passes predefined conditions.

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

No Hooks.

Return

null. Nothing.

Usage

$result = MagentoMigration::possibly_add_note();

Code of MagentoMigration::possibly_add_note() WC 7.1.0

public static function possibly_add_note() {
	$onboarding_profile = get_option( OnboardingProfile::DATA_OPTION, array() );

	if ( empty( $onboarding_profile ) ) {
		return;
	}

	if (
		! isset( $onboarding_profile['other_platform'] ) ||
		'magento' !== $onboarding_profile['other_platform']
	) {
		return;
	}

	if (
		! isset( $onboarding_profile['setup_client'] ) ||
		$onboarding_profile['setup_client']
	) {
		return;
	}

	WC()->queue()->schedule_single( time() + ( 5 * MINUTE_IN_SECONDS ), 'woocommerce_admin_magento_migration_note' );
}