woocommerce_status_widget_out_of_stock_count_pre_query

woocommerce_status_widget_out_of_stock_count_pre_query

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: woocommerce.8.7.0

apply_filters('woocommerce_status_widget_out_of_stock_count_pre_query') is found 1 times:

  • /includes/admin/class-wc-admin-dashboard.php line 301
    				 * @since 4.3.0
    				 * @param null|string $outofstock_count Out of stock count, by default null.
    				 * @param int         $nostock          No stock amount
    				 */
    				$outofstock_count = apply_filters( 'woocommerce_status_widget_out_of_stock_count_pre_query', null, $nostock );
    
    				if ( is_null( $outofstock_count ) ) {
    					$outofstock_count = (int) $wpdb->get_var(
    						$wpdb->prepare(
    							"SELECT COUNT( product_id )
    							FROM {$wpdb->wc_product_meta_lookup} AS lookup