WC_Admin_Setup_Wizard::wc_setup_activate_get_feature_listprotectedWC 1.0

Deprecated since 4.6.0. It is no longer supported and may be removed in future releases. It is recommended to replace this function with the same one.

Get feature list for activation.

Method of the class: WC_Admin_Setup_Wizard{}

No Hooks.

Returns

Array.

Usage

// protected - for code of main (parent) or child class
$result = $this->wc_setup_activate_get_feature_list();

Changelog

Deprecated since 4.6.0

WC_Admin_Setup_Wizard::wc_setup_activate_get_feature_list() code 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;
}