• Resolved lands23

    (@lands23)


    hi. i have a piece of code that needs to insert array of product ids (or sku) to the shortcode.

    the shortcode is something like this:

    return do_shortcode(“[products ids =’21108,19396,19386,19381′ ]”);

    how can i insert array of products instead? i have tried this:

    return do_shortcode( “[products ids=’ . implode (‘,’ , $list) . ‘]”);

    When i implode and insert the array in between it gives me all the products in the store. please can somebody help ?

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘add products ids dynamically to shortcode’ is closed to new replies.