WordPress at Your Fingertips
function is not described

WC_Query::stock_status_meta_query() public WC 1.0

Deprecated from version 3.0.0 Replaced with taxonomy.. It is no longer supported and can be removed in future releases. It is recommended to replace this function with the same one.

Returns a meta query to handle product stock status.

{} It's a method of the class: WC_Query{}

No Hooks.




$WC_Query = new WC_Query();
$WC_Query->stock_status_meta_query( $status );
(default: 'instock').
Default: 'instock'


Deprecated Since 3.0.0 Replaced with taxonomy.

Code of WC_Query::stock_status_meta_query() WC 5.6.0

public function stock_status_meta_query( $status = 'instock' ) {
	return array();