Automattic\WooCommerce\Internal\Admin\Orders
PageController::set_action()
Sets the current action based on querystring arguments. Defaults to 'list_orders'.
Method of the class: PageController{}
No Hooks.
Return
null
. Nothing (null).
Usage
// private - for code of main (parent) class only $result = $this->set_action(): void;
PageController::set_action() PageController::set action code WC 8.7.0
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; } }