Automattic\WooCommerce\Internal\Admin\Orders
PageController::set_action
Sets the current action based on querystring arguments. Defaults to 'list_orders'.
Метод класса: PageController{}
Хуков нет.
Возвращает
null. Ничего (null).
Использование
// private - только в коде основоного (родительского) класса $result = $this->set_action(): void;
Код PageController::set_action() PageController::set action WC 10.4.2
private function set_action(): void {
switch ( isset( $_GET['action'] ) ? sanitize_text_field( wp_unslash( $_GET['action'] ) ) : '' ) {
case 'edit':
$this->current_action = 'edit_order';
break;
case 'new':
$this->current_action = 'new_order';
break;
default:
$this->current_action = 'list_orders';
break;
}
}