diff --git a/deprecated/ActionScheduler_Store_Deprecated.php b/deprecated/ActionScheduler_Store_Deprecated.php index 599e25376..002dc75b4 100644 --- a/deprecated/ActionScheduler_Store_Deprecated.php +++ b/deprecated/ActionScheduler_Store_Deprecated.php @@ -6,6 +6,36 @@ */ abstract class ActionScheduler_Store_Deprecated { + /** + * Mark an action that failed to fetch correctly as failed. + * + * @since 2.2.6 + * + * @param int $action_id The ID of the action. + */ + public function mark_failed_fetch_action( $action_id ) { + _deprecated_function( __METHOD__, '3.0.0', 'ActionScheduler_Store::mark_failure()' ); + self::$store->mark_failure( $action_id ); + } + + /** + * Add base hooks + * + * @since 2.2.6 + */ + protected static function hook() { + _deprecated_function( __METHOD__, '3.0.0' ); + } + + /** + * Remove base hooks + * + * @since 2.2.6 + */ + protected static function unhook() { + _deprecated_function( __METHOD__, '3.0.0' ); + } + /** * Get the site's local time. * diff --git a/tests/phpunit/jobstore/ActionScheduler_wpPostStore_Test.php b/tests/phpunit/jobstore/ActionScheduler_wpPostStore_Test.php index ce6795cbf..cba33e935 100644 --- a/tests/phpunit/jobstore/ActionScheduler_wpPostStore_Test.php +++ b/tests/phpunit/jobstore/ActionScheduler_wpPostStore_Test.php @@ -54,9 +54,7 @@ public function test_action_bad_args( $content ) { 'post_content' => $content, ) ); - ActionScheduler_Store::unhook(); $fetched = $store->fetch_action( $post_id ); - ActionScheduler_Store::hook(); $this->assertInstanceOf( 'ActionScheduler_NullSchedule', $fetched->get_schedule() ); }