Automattic\WooCommerce\Admin\Features
Features::enable
Enable a toggleable optional feature.
Method of the class: Features{}
No Hooks.
Returns
true|false.
Usage
$result = Features::enable( $feature );
- $feature(string) (required)
- Feature name.
Features::enable() Features::enable code WC 10.3.6
public static function enable( $feature ) {
$features = self::get_optional_feature_options();
if ( isset( $features[ $feature ] ) ) {
update_option( $features[ $feature ], 'yes' );
return true;
}
return false;
}