WC_Admin_Setup_Wizard::wc_setup_activate_get_feature_listprotectedWC 1.0

Устарела с версии 4.6.0. Больше не поддерживается и может быть удалена. Рекомендуется заменить эту функцию на аналог.

Get feature list for activation.

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

Хуков нет.

Возвращает

Массив.

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

// protected - в коде основоного (родительского) или дочернего класса
$result = $this->wc_setup_activate_get_feature_list();

Список изменений

Устарела с 4.6.0

Код WC_Admin_Setup_Wizard::wc_setup_activate_get_feature_list() WC 10.8.1

protected function wc_setup_activate_get_feature_list() {
	$features = array();

	$stripe_settings = get_option( 'woocommerce_stripe_settings', false );
	$stripe_enabled  = is_array( $stripe_settings )
		&& isset( $stripe_settings['create_account'] ) && 'yes' === $stripe_settings['create_account']
		&& isset( $stripe_settings['enabled'] ) && 'yes' === $stripe_settings['enabled'];
	$ppec_settings   = get_option( 'woocommerce_ppec_paypal_settings', false );
	$ppec_enabled    = is_array( $ppec_settings )
		&& isset( $ppec_settings['reroute_requests'] ) && 'yes' === $ppec_settings['reroute_requests']
		&& isset( $ppec_settings['enabled'] ) && 'yes' === $ppec_settings['enabled'];

	$features['payment'] = $stripe_enabled || $ppec_enabled;
	$features['taxes']   = (bool) get_option( 'woocommerce_setup_automated_taxes', false );
	$features['labels']  = (bool) get_option( 'woocommerce_setup_shipping_labels', false );

	return $features;
}