Skip to content

Commit

Permalink
Deprecate actions reverted in c26a8dc
Browse files Browse the repository at this point in the history
  • Loading branch information
Brent Shepherd authored and thenbrent committed Jul 30, 2019
1 parent 024d52f commit d3a690d
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 2 deletions.
30 changes: 30 additions & 0 deletions deprecated/ActionScheduler_Store_Deprecated.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand Down
2 changes: 0 additions & 2 deletions tests/phpunit/jobstore/ActionScheduler_wpPostStore_Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -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() );
}

Expand Down

0 comments on commit d3a690d

Please sign in to comment.