Automattic\WooCommerce\Admin\Features\OnboardingTasks

DeprecatedOptions::get_deprecated_options()public staticWC 1.0

Get the values from the correct source when attempting to retrieve deprecated options.

{} It's a method of the class: DeprecatedOptions{}

No Hooks.

Return

String.

Usage

$result = DeprecatedOptions::get_deprecated_options( $pre_option, $option );
$pre_option(string) (required)
Pre option value.
$option(string) (required)
Option name.

Code of DeprecatedOptions::get_deprecated_options() WC 6.6.1

public static function get_deprecated_options( $pre_option, $option ) {
	if ( defined( 'WC_INSTALLING' ) && WC_INSTALLING === true ) {
		return $pre_option;
	}

	$hidden = get_option( 'woocommerce_task_list_hidden_lists', array() );
	switch ( $option ) {
		case 'woocommerce_task_list_hidden':
			return in_array( 'setup', $hidden, true ) ? 'yes' : 'no';
		case 'woocommerce_extended_task_list_hidden':
			return in_array( 'extended', $hidden, true ) ? 'yes' : 'no';
	}
}