Undo Unsubscribe Shortcode not working
-
https://support.mailpoet.com/knowledgebase/customize-your-confirmation-pages/
The instructions on this page were followed and I’ve added the [mailpoet_undo_unsubscribe] to my page but it is not rendering anything.
Here’s the page: https://seahorseworld.com.au/unsubscribe/
Here’s my functions.php text:
/**
* function to return an undo unsubscribe string for MailPoet newsletters
* you could place it in the functions.php of your theme
* @return string
*/
function mpoet_get_undo_unsubscribe(){
if(class_exists('WYSIJA') && !empty($_REQUEST['wysija-key'])){$undo_paramsurl = array(
'wysija-page'=>1,
'controller'=>'confirm',
'action'=>'undounsubscribe',
'wysija-key'=>$_REQUEST['wysija-key']
);$model_config = WYSIJA::get('config','model');
$link_undo_unsubscribe = WYSIJA::get_permalink($model_config->getValue('confirmation_page'),$undo_paramsurl);$undo_unsubscribe = str_replace(
array('[link]','[/link]'),
array('',''),
'<p><b>'.__('You made a mistake? [link]Undo unsubscribe[/link].',WYSIJA)).'</b><p>';return $undo_unsubscribe;
}
return '';
}add_shortcode('mailpoet_undo_unsubscribe', 'mpoet_get_undo_unsubscribe');
- The topic ‘Undo Unsubscribe Shortcode not working’ is closed to new replies.