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.

Method of the class: SellingOnlineCourses{}

No Hooks.

Return

null. Nothing (null).

Usage

$result = SellingOnlineCourses::check_onboarding_profile( $old_value, $value, $option );
$old_value(object) (required)
The old option value.
$value(object) (required)
The new option value.
$option(string) (required)
The name of the option.

SellingOnlineCourses::check_onboarding_profile() code WC 8.6.1

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();
}