WordPress at Your Fingertips
function is not described

ActionScheduler_wpPostStore::validate_action() protected WC 1.0

InnoDB indexes have a maximum size of 767 bytes by default, which is only 191 characters with utf8mb4.

Previously, AS wasn't concerned about args length, as we used the (unindex) post_content column. However, as we prepare to move to custom tables, and can use an indexed VARCHAR column instead, we want to warn developers of this impending requirement.

{} It's a method of the class: ActionScheduler_wpPostStore{}

No Hooks.


null. Nothing.


// protected - for code of main (parent) or child class
$result = $this->validate_action( $action );
$action(ActionScheduler_Action) (required)
Action object.

Code of ActionScheduler_wpPostStore::validate_action() WC 6.1.0

protected function validate_action( ActionScheduler_Action $action ) {
	try {
		parent::validate_action( $action );
	} catch ( Exception $e ) {
		/* translators: %s is the error message */
		$message = sprintf( __( '%s Support for strings longer than this will be removed in a future version.', 'woocommerce' ), $e->getMessage() );
		_doing_it_wrong( 'ActionScheduler_Action::$args', esc_html( $message ), '2.1.0' );