ActionScheduler_wpPostStore::validate_action()protectedWC 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.

Method of the class: ActionScheduler_wpPostStore{}

No Hooks.

Return

null. Nothing (null).

Usage

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

ActionScheduler_wpPostStore::validate_action() code WC 8.7.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' );
	}
}