Automattic\WooCommerce\Internal\DataStores\Orders
CustomOrdersTableController::create_custom_orders_tables()
Create the custom orders tables in response to the user pressing the tool button.
Метод класса: CustomOrdersTableController{}
Хуков нет.
Возвращает
null
. Ничего.
Использование
// private - только в коде основоного (родительского) класса $result = $this->create_custom_orders_tables( $verify_nonce );
- $verify_nonce(true|false)
- True to perform the nonce verification, false to skip it.
По умолчанию: true
Код CustomOrdersTableController::create_custom_orders_tables() CustomOrdersTableController::create custom orders tables WC 7.3.0
private function create_custom_orders_tables( bool $verify_nonce = true ) { // phpcs:ignore WordPress.Security.ValidatedSanitizedInput if ( $verify_nonce && ( ! isset( $_REQUEST['_wpnonce'] ) || wp_verify_nonce( $_REQUEST['_wpnonce'], 'debug_action' ) === false ) ) { throw new \Exception( 'Invalid nonce' ); } $this->data_synchronizer->create_database_tables(); update_option( self::CUSTOM_ORDERS_TABLE_USAGE_ENABLED_OPTION, 'no' ); }