Skip to content

Commit d3a690d

Browse files
Brent Shepherdthenbrent
authored andcommitted
Deprecate actions reverted in c26a8dc
1 parent 024d52f commit d3a690d

File tree

2 files changed

+30
-2
lines changed

2 files changed

+30
-2
lines changed

deprecated/ActionScheduler_Store_Deprecated.php

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,36 @@
66
*/
77
abstract class ActionScheduler_Store_Deprecated {
88

9+
/**
10+
* Mark an action that failed to fetch correctly as failed.
11+
*
12+
* @since 2.2.6
13+
*
14+
* @param int $action_id The ID of the action.
15+
*/
16+
public function mark_failed_fetch_action( $action_id ) {
17+
_deprecated_function( __METHOD__, '3.0.0', 'ActionScheduler_Store::mark_failure()' );
18+
self::$store->mark_failure( $action_id );
19+
}
20+
21+
/**
22+
* Add base hooks
23+
*
24+
* @since 2.2.6
25+
*/
26+
protected static function hook() {
27+
_deprecated_function( __METHOD__, '3.0.0' );
28+
}
29+
30+
/**
31+
* Remove base hooks
32+
*
33+
* @since 2.2.6
34+
*/
35+
protected static function unhook() {
36+
_deprecated_function( __METHOD__, '3.0.0' );
37+
}
38+
939
/**
1040
* Get the site's local time.
1141
*

tests/phpunit/jobstore/ActionScheduler_wpPostStore_Test.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,7 @@ public function test_action_bad_args( $content ) {
5454
'post_content' => $content,
5555
) );
5656

57-
ActionScheduler_Store::unhook();
5857
$fetched = $store->fetch_action( $post_id );
59-
ActionScheduler_Store::hook();
6058
$this->assertInstanceOf( 'ActionScheduler_NullSchedule', $fetched->get_schedule() );
6159
}
6260

0 commit comments

Comments
 (0)