Created
October 28, 2022 21:44
-
-
Save uamv/2d42aa84a1d2c31deae376b2d1d54ee6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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