ActionScheduler_wpPostStore::delete_action()publicWC 1.0

Delete action.

{} Это метод класса: ActionScheduler_wpPostStore{}

Хуки из метода

Возвращает

null. Ничего.

Использование

$ActionScheduler_wpPostStore = new ActionScheduler_wpPostStore();
$ActionScheduler_wpPostStore->delete_action( $action_id );
$action_id(int) (обязательный)
Action ID.

Код ActionScheduler_wpPostStore::delete_action() WC 6.9.4

public function delete_action( $action_id ) {
	$post = get_post( $action_id );
	if ( empty( $post ) || ( self::POST_TYPE !== $post->post_type ) ) {
		/* translators: %s is the action ID */
		throw new InvalidArgumentException( sprintf( __( 'Unidentified action %s', 'woocommerce' ), $action_id ) );
	}
	do_action( 'action_scheduler_deleted_action', $action_id );

	wp_delete_post( $action_id, true );
}