Change delivery time for scheduled gift cards

Perform the following steps to change the schedule start time for this job.

1. Download the free Code Snippets plugin:
2. Create a new Snippet with the following code:

function custom_pwgc_scheduled_start_time( $timestamp ) {
    // By default we use the WordPress "current_time" function to get the current time
    // for today. It relies on the Timezone setting found under Settings -> General.
    // Then we get today at midnight in a timestamp using the PHP function strtotime().
    // If necessary to adjust this, return a valid timestamp for the initial run of the
    // job and then it will run daily on that time going forward.
    $timestamp = strtotime( 'today 03:00pm', current_time( 'timestamp' ) );

    return $timestamp;
add_filter( 'pwgc_scheduled_start_time', 'custom_pwgc_scheduled_start_time' );

3. IMPORTANT – The job is already scheduled so you must deactivate the plugin to clear the job. Click on Plugins -> Installed Plugins -> Scroll down to PW WooCommerce Gift Cards and click “Deactivate”.
4. After it has been deactivated, click on “Activate” to start it back up and schedule the job using your new settings.

For more information about this timestamp, see the WordPress Codex:


Skip to content