Automattic\WooCommerce\Internal\Admin\Orders

ListTable::print_hidden_form_fields()privateWC 1.0

Outputs hidden fields used to retain state when filtering.

Метод класса: ListTable{}

No Hooks.

Return

null. Nothing.

Usage

// private - for code of main (parent) class only
$result = $this->print_hidden_form_fields(): void;

Code of ListTable::print_hidden_form_fields() WC 7.1.0

private function print_hidden_form_fields(): void {
	echo '<input type="hidden" name="page" value="wc-orders" >';

	$state_params = array(
		'paged',
		'status',
	);

	foreach ( $state_params as $param ) {
		if ( ! isset( $_GET[ $param ] ) ) {
			continue;
		}

		echo '<input type="hidden" name="' . esc_attr( $param ) . '" value="' . esc_attr( sanitize_text_field( wp_unslash( $_GET[ $param ] ) ) ) . '" >';
	}
}