Documentation


Deprecated: Function wp_get_loading_attr_default is deprecated since version 6.3.0! Use wp_get_loading_optimization_attributes() instead. in /var/www/html/wp-includes/functions.php on line 6131

Change the time of day for next payment

When a subscription that has a schedule assigned renews the WooCommerce Subscriptions Schedule plugin will modify the next_payment date to match the next date in the schedule.

By default the Hour:Minute:Second is set to 12:00:00. If you need to change the time of day for the next_payment date you can use the sp_next_payment_time_of_day filter.

Example:

//add_filter('sp_next_payment_time_of_day', 'custom_next_payment_time_of_day', 10 );
/**
 * @param $time
 * @return mixed
 */
function custom_next_payment_time_of_day( $time ) {
    $custom_time = '10:00:00';
    return $custom_time;
}

Need help from professional WooCommerce developers?

Get a quote from Grow Development today!