Web Hosting
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

WordPress fix Wocommerce – How can i get best seller & out of stock products in one query.

Discussion in 'Misc WordPress Requests' started by Rohit Ambeldkar, Nov 29, 2017.

  1. Rohit Ambeldkar

    Guest

    Wocommerce – How can i get best seller & out of stock products in one query., by Rohit Ambeldkar

    Hello ,
    Woocommerce Plugin –
    How can i get best seller & out of stock products in one query.
    Please help me with this.

    This is my code.
    $args = array( ‘post_type’ => ‘product’, ‘posts_per_page’ => 30, ‘orderby’ => ‘date’, ‘order’ => ‘DESC’, ‘meta_query’ => array(
    array(
    ‘key’ => ‘_stock_status’,
    ‘value’ => ‘outofstock’
    )
    )
    );

    Thanks

    Wocommerce – How can i get best seller & out of stock products in one query.
     
    #1

Share This Page

Web Hosting