mirror of
https://github.com/pronamic/woocommerce-subscriptions.git
synced 2025-10-13 12:52:56 +00:00
2.4.5
This commit is contained in:

committed by
Remco Tolsma

parent
37367ac369
commit
721dda6e5c
22
includes/libraries/action-scheduler/classes/ActionScheduler_Store.php
Executable file → Normal file
22
includes/libraries/action-scheduler/classes/ActionScheduler_Store.php
Executable file → Normal file
@@ -168,20 +168,11 @@ abstract class ActionScheduler_Store {
|
||||
if ( ! $next ) {
|
||||
throw new InvalidArgumentException( __( 'Invalid schedule. Cannot save action.', 'action-scheduler' ) );
|
||||
}
|
||||
$next->setTimezone( $this->get_local_timezone() );
|
||||
|
||||
ActionScheduler_TimezoneHelper::set_local_timezone( $next );
|
||||
return $next->format( 'Y-m-d H:i:s' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the site's local time. Wrapper for ActionScheduler_TimezoneHelper::get_local_timezone().
|
||||
*
|
||||
* @return DateTimeZone
|
||||
*/
|
||||
protected function get_local_timezone() {
|
||||
return ActionScheduler_TimezoneHelper::get_local_timezone();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
@@ -207,4 +198,15 @@ abstract class ActionScheduler_Store {
|
||||
}
|
||||
return self::$store;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the site's local time.
|
||||
*
|
||||
* @deprecated 2.1.0
|
||||
* @return DateTimeZone
|
||||
*/
|
||||
protected function get_local_timezone() {
|
||||
_deprecated_function( __FUNCTION__, '2.1.0', 'ActionScheduler_TimezoneHelper::set_local_timezone()' );
|
||||
return ActionScheduler_TimezoneHelper::get_local_timezone();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user