Automattic\WooCommerce\Internal\Admin\Notes

SellingOnlineCourses::check_onboarding_profile()public staticWC 1.0

Check to see if the profiler options match before possibly adding note.

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

Хуков нет.

Возвращает

null. Ничего (null).

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

$result = SellingOnlineCourses::check_onboarding_profile( $old_value, $value, $option );
$old_value(объект) (обязательный)
The old option value.
$value(объект) (обязательный)
The new option value.
$option(строка) (обязательный)
The name of the option.

Код SellingOnlineCourses::check_onboarding_profile() WC 8.7.0

public static function check_onboarding_profile( $old_value, $value, $option ) {
	// Skip adding if this store is in the education/learning industry.
	if ( ! isset( $value['industry'] ) ) {
		return;
	}
	$industry_slugs = array_column( $value['industry'], 'slug' );
	if ( ! in_array( 'education-and-learning', $industry_slugs, true ) ) {
		return;
	}

	self::possibly_add_note();
}