mirror of
https://gh.wpcy.net/https://github.com/mainwp/Code-Snippets-Functions.git
synced 2026-05-02 12:02:25 +08:00
https://stackoverflow.com/questions/77870469/disabling-woocommerce-marketing-without-disabling-shipping-functions/77870616
8 lines
256 B
Text
8 lines
256 B
Text
add_filter('woocommerce_admin_features', 'disable_marketing_feature');
|
|
function disable_marketing_feature($features){
|
|
$key = array_search('marketing', $features);
|
|
if ( ! empty($key) ) {
|
|
unset($features[$key]);
|
|
}
|
|
return $features;
|
|
}
|