Change Scope and Unsubscribe Success URL


Filename: gpns-change-scope-unsubscribe-success-url.php

 * Gravity Perks // Notification Scheduler // Change Scope and Unsubscribe Success URL
// Update "123" to the form ID and "1a23bc456def7" to the notification ID.
add_filter( 'gpns_unsubscribe_url_args_123_1a23bc456def7', function ( $unsubscribe_info ) {
	// Only unsubscribe from current notification
	$unsubscribe_info['scope'] = 'nid';

	// Change unsubscribe success URL.
	$unsubscribe_info['url'] = home_url( '/example-unsubscribe-page' );

	return $unsubscribe_info;
} );

Leave a Reply

Your email address will not be published. Required fields are marked *

  • Trouble installing this snippet? See our troubleshooting tips.
  • Need to include code? Create a gist and link to it in your comment.
  • Reporting a bug? Provide a URL where this issue can be recreated.

By commenting, I understand that I may receive emails related to Gravity Wiz and can unsubscribe at any time.