mailpoet
/
vendor
/
woocommerce
/
action-scheduler
/
classes
/
ActionScheduler_InvalidActionException.php
WP_CLI
1 year ago
abstracts
1 year ago
actions
1 year ago
data-stores
1 year ago
migration
1 year ago
schedules
1 year ago
schema
1 year ago
ActionScheduler_ActionClaim.php
1 year ago
ActionScheduler_ActionFactory.php
1 year ago
ActionScheduler_AdminView.php
1 year ago
ActionScheduler_AsyncRequest_QueueRunner.php
1 year ago
ActionScheduler_Compatibility.php
1 year ago
ActionScheduler_DataController.php
1 year ago
ActionScheduler_DateTime.php
1 year ago
ActionScheduler_Exception.php
4 years ago
ActionScheduler_FatalErrorMonitor.php
1 year ago
ActionScheduler_InvalidActionException.php
1 year ago
ActionScheduler_ListTable.php
1 year ago
ActionScheduler_LogEntry.php
1 year ago
ActionScheduler_NullLogEntry.php
1 year ago
ActionScheduler_OptionLock.php
2 years ago
ActionScheduler_QueueCleaner.php
1 year ago
ActionScheduler_QueueRunner.php
1 year ago
ActionScheduler_SystemInformation.php
1 year ago
ActionScheduler_Versions.php
1 year ago
ActionScheduler_WPCommentCleaner.php
1 year ago
ActionScheduler_wcSystemStatus.php
4 years ago
index.php
3 years ago
ActionScheduler_InvalidActionException.php
21 lines
| 1 | <?php |
| 2 | if (!defined('ABSPATH')) exit; |
| 3 | class ActionScheduler_InvalidActionException extends \InvalidArgumentException implements ActionScheduler_Exception { |
| 4 | public static function from_schedule( $action_id, $schedule ) { |
| 5 | $message = sprintf( |
| 6 | __( 'Action [%1$s] has an invalid schedule: %2$s', 'action-scheduler' ), |
| 7 | $action_id, |
| 8 | var_export( $schedule, true ) // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_var_export |
| 9 | ); |
| 10 | return new static( $message ); |
| 11 | } |
| 12 | public static function from_decoding_args( $action_id, $args = array() ) { |
| 13 | $message = sprintf( |
| 14 | __( 'Action [%1$s] has invalid arguments. It cannot be JSON decoded to an array. $args = %2$s', 'action-scheduler' ), |
| 15 | $action_id, |
| 16 | var_export( $args, true ) // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_var_export |
| 17 | ); |
| 18 | return new static( $message ); |
| 19 | } |
| 20 | } |
| 21 |