Skip to content

Instantly share code, notes, and snippets.

@bernattorras
Created July 5, 2018 17:09
Show Gist options
  • Save bernattorras/681aa179be2cbeb4c9a2cfe5e5648eca to your computer and use it in GitHub Desktop.
Save bernattorras/681aa179be2cbeb4c9a2cfe5e5648eca to your computer and use it in GitHub Desktop.
Function to disable the "Choose a new subscription" message when switching a subscription item
<?php
/**
* Function to disable the "Choose a new subscription" message when switching a subscription item
**/
add_filter('woocommerce_add_notice', 'disable_switch_notice', 10, 1);
function disable_switch_notice( $message){
if($message=="Choose a new subscription."){
$message = '';
}
return $message;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment