Automattic\WooCommerce\Internal\Admin\Notes
SellingOnlineCourses::check_onboarding_profile
Check to see if the profiler options match before possibly adding note.
Method of the class: SellingOnlineCourses{}
No Hooks.
Returns
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() SellingOnlineCourses::check onboarding profile code WC 10.8.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();
}