Always return columns in ‘posts_fields’ filters.

This commit is contained in:
Jeff Stieler 2019-06-28 10:40:17 -06:00
parent ab7ceeed23
commit c787c8c50a
1 changed files with 3 additions and 1 deletions

View File

@ -135,8 +135,10 @@ class WC_Admin_REST_Products_Controller extends WC_REST_Products_Controller {
*/
public static function add_wp_query_fields( $select, $wp_query ) {
if ( $wp_query->get( 'low_in_stock' ) ) {
return $select . ', low_stock_amount_meta.meta_value AS low_stock_amount';
$select .= ', low_stock_amount_meta.meta_value AS low_stock_amount';
}
return $select;
}
/**