WC_Admin_List_Table_Products::filter_stock_status_post_clauses() public WC 1.0
Filter by stock status.
{} Это метод класса: WC_Admin_List_Table_Products{}
Хуков нет.
Возвращает
Массив.
Использование
$WC_Admin_List_Table_Products = new WC_Admin_List_Table_Products(); $WC_Admin_List_Table_Products->filter_stock_status_post_clauses( $args );
- $args(массив) (обязательный)
- Query args.
Код WC_Admin_List_Table_Products::filter_stock_status_post_clauses() WC Admin List Table Products::filter stock status post clauses WC 5.0.0
public function filter_stock_status_post_clauses( $args ) {
global $wpdb;
if ( ! empty( $_GET['stock_status'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended
$args['join'] = $this->append_product_sorting_table_join( $args['join'] );
$args['where'] .= $wpdb->prepare( ' AND wc_product_meta_lookup.stock_status=%s ', wc_clean( wp_unslash( $_GET['stock_status'] ) ) ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended
}
return $args;
}