Skip to content

Commit

Permalink
Merge pull request #409 from woocommerce/release/version-3.0
Browse files Browse the repository at this point in the history
release version 3.0.0
  • Loading branch information
james-allan authored Jan 3, 2020
2 parents b9f3c86 + fd29c14 commit 2f0ef51
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions action-scheduler.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Description: A robust scheduling library for use in WordPress plugins.
* Author: Automattic
* Author URI: https://automattic.com/
* Version: 3.0.0-RC-4
* Version: 3.0.0
* License: GPLv3
*
* Copyright 2019 Automattic, Inc. (https://automattic.com/contact/)
Expand All @@ -25,28 +25,28 @@
*
*/

if ( ! function_exists( 'action_scheduler_register_3_dot_0_dot_0_rc_4' ) ) {
if ( ! function_exists( 'action_scheduler_register_3_dot_0_dot_0' ) ) {

if ( ! class_exists( 'ActionScheduler_Versions' ) ) {
require_once( 'classes/ActionScheduler_Versions.php' );
add_action( 'plugins_loaded', array( 'ActionScheduler_Versions', 'initialize_latest_version' ), 1, 0 );
}

add_action( 'plugins_loaded', 'action_scheduler_register_3_dot_0_dot_0_rc_4', 0, 0 );
add_action( 'plugins_loaded', 'action_scheduler_register_3_dot_0_dot_0', 0, 0 );

function action_scheduler_register_3_dot_0_dot_0_rc_4() {
function action_scheduler_register_3_dot_0_dot_0() {
$versions = ActionScheduler_Versions::instance();
$versions->register( '3.0.0-RC-4', 'action_scheduler_initialize_3_dot_0_dot_0_rc_4' );
$versions->register( '3.0.0', 'action_scheduler_initialize_3_dot_0_dot_0' );
}

function action_scheduler_initialize_3_dot_0_dot_0_rc_4() {
function action_scheduler_initialize_3_dot_0_dot_0() {
require_once( 'classes/abstracts/ActionScheduler.php' );
ActionScheduler::init( __FILE__ );
}

// Support usage in themes - load this version if no plugin has loaded a version yet.
if ( did_action( 'plugins_loaded' ) && ! class_exists( 'ActionScheduler' ) ) {
action_scheduler_register_3_dot_0_dot_0_rc_4();
action_scheduler_register_3_dot_0_dot_0();
do_action( 'action_scheduler_pre_theme_init' );
ActionScheduler_Versions::initialize_latest_version();
}
Expand Down
2 changes: 1 addition & 1 deletion tests/phpunit/procedural_api/procedural_api_Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ public function test_as_get_datetime_object_timezone() {
$au_now = new ActionScheduler_DateTime(null);
$as_au_now = as_get_datetime_object();

$this->assertEquals($au_now->getTimestamp(),$as_now->getTimestamp());
$this->assertEquals( $au_now->getTimestamp(), $as_now->getTimestamp(), '', 2 );

// But not in the same timezone, as $as_now should be using UTC
$this->assertNotEquals($au_now->format('Y-m-d H:i:s'),$as_now->format('Y-m-d H:i:s'));
Expand Down

0 comments on commit 2f0ef51

Please sign in to comment.