WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
функция не описана

WC_Admin_List_Table_Products::render_products_stock_status_filter() public WC 3.5.0

Render the stock status filter for the list table.

Это метод класса: WC_Admin_List_Table_Products{}

Хуков нет.

Возвращает

Null. Ничего.

Использование

$WC_Admin_List_Table_Products = new WC_Admin_List_Table_Products();
$WC_Admin_List_Table_Products->render_products_stock_status_filter();

Список изменений

С версии 3.5.0 Введена.

Код WC Admin List Table Products::render products stock status filter: woocommerce/includes/admin/list-tables/class-wc-admin-list-table-products.php WC 4.5.2

<?php
public function render_products_stock_status_filter() {
	$current_stock_status = isset( $_REQUEST['stock_status'] ) ? wc_clean( wp_unslash( $_REQUEST['stock_status'] ) ) : false; // WPCS: input var ok, sanitization ok.
	$stock_statuses       = wc_get_product_stock_status_options();
	$output               = '<select name="stock_status"><option value="">' . esc_html__( 'Filter by stock status', 'woocommerce' ) . '</option>';

	foreach ( $stock_statuses as $status => $label ) {
		$output .= '<option ' . selected( $status, $current_stock_status, false ) . ' value="' . esc_attr( $status ) . '">' . esc_html( $label ) . '</option>';
	}

	$output .= '</select>';
	echo $output; // WPCS: XSS ok.
}