Automattic\WooCommerce\Admin\Notes

MagentoMigration::possibly_add_note()public staticWC 1.0

Add the note if it passes predefined conditions.

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

Хуков нет.

Возвращает

null. Ничего.

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

$result = MagentoMigration::possibly_add_note();

Код MagentoMigration::possibly_add_note() WC 6.4.1

public static function possibly_add_note() {
	$onboarding_profile = get_option( Onboarding::PROFILE_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' );
}