WC_Admin_List_Table_Coupons::render_filters()
Render any custom filters and search inputs for the list table.
Метод класса: WC_Admin_List_Table_Coupons{}
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->render_filters();
Код WC_Admin_List_Table_Coupons::render_filters() WC Admin List Table Coupons::render filters WC 8.7.0
<?php protected function render_filters() { ?> <select name="coupon_type" id="dropdown_shop_coupon_type"> <option value=""><?php esc_html_e( 'Show all types', 'woocommerce' ); ?></option> <?php $types = wc_get_coupon_types(); foreach ( $types as $name => $type ) { echo '<option value="' . esc_attr( $name ) . '"'; if ( isset( $_GET['coupon_type'] ) ) { // WPCS: input var ok. selected( $name, wc_clean( wp_unslash( $_GET['coupon_type'] ) ) ); // WPCS: input var ok, sanitization ok. } echo '>' . esc_html( $type ) . '</option>'; } ?> </select> <?php }