Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save uamv/2d42aa84a1d2c31deae376b2d1d54ee6 to your computer and use it in GitHub Desktop.
Save uamv/2d42aa84a1d2c31deae376b2d1d54ee6 to your computer and use it in GitHub Desktop.
// filter recurringly weekly notification to instead schedule as fortnightly
add_filter( 'gpns_schedule_timestamp', function ( $timestamp, $notification, $entry, $is_recurring, $current_time ) {
// properties for a recurring weekly notification
$form_id = 1;
$notification_id = '63595d7aecb08';
if ( (int) $entry['form_id'] !== $form_id || $notification['id'] !== $notification_id || ! $is_recurring ) {
return $timestamp;
}
return strtotime( "+1 week", $timestamp );
}, 10, 5 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment