• touto

    (@touto)


    Hi,

    I have a custom shop page and was wondering whether it is possible to retrieve the IDs of the products that are currently shown based on the filters? I want to feed them into my loop:

    $query = new WC_Product_Query( array(
        'limit' => -1,
        'include' => array( USE THE IDS HERE ),
        'return' => 'ids',
    ) );

    Many thanks

Viewing 1 replies (of 1 total)
  • Plugin Author RazyRx

    (@razyrx)

    Hello,

    Plugin do not have any function that you can use to get IDs.
    Plugin modify attributes array for WP_Query, you can use woocommerce_shortcode_products_query WooCommerce hook to apply changes to attributes array.

    Regards,
    Oleg

Viewing 1 replies (of 1 total)
  • The topic ‘Array with IDs?’ is closed to new replies.