Warning: This function has been deprecated.

wc_get_min_max_price_meta_query( array $args )

Get min/max price meta query args.


Description Description


Parameters Parameters

$args

(Required) Min price and max price arguments.


Top ↑

Return Return

(array)


Top ↑

Source Source

File: includes/wc-deprecated-functions.php

function wc_get_min_max_price_meta_query( $args ) {
	wc_deprecated_function( 'wc_get_min_max_price_meta_query()', '3.6' );

	$current_min_price = isset( $args['min_price'] ) ? floatval( $args['min_price'] ) : 0;
	$current_max_price = isset( $args['max_price'] ) ? floatval( $args['max_price'] ) : PHP_INT_MAX;

	return apply_filters(
		'woocommerce_get_min_max_price_meta_query',
		array(
			'key'     => '_price',
			'value'   => array( $current_min_price, $current_max_price ),
			'compare' => 'BETWEEN',
			'type'    => 'DECIMAL(10,' . wc_get_price_decimals() . ')',
		),
		$args
	);
}

Top ↑

Changelog Changelog

Changelog
Version Description
3.6.0 This function has been deprecated.
3.0.0 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.