ActionScheduler_wpPostStore::validate_action()
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.
Метод класса: ActionScheduler_wpPostStore{}
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->validate_action( $action );
- $action(ActionScheduler_Action) (обязательный)
- Action object.
Код ActionScheduler_wpPostStore::validate_action() ActionScheduler wpPostStore::validate action 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' ); } }