Loading [products] through ajax.
-
I want to load the [products] shortcode data via ajax: at first it didn’t work for me: the product cards looked different than in the catalog.
I was able to get the product cards to look right by calling shop_customization() – is this a good solution or is there a better option for this in the theme?
add_action( 'wp_ajax_name', function() { ... Astra_Woocommerce::get_instance()->shop_customization(); echo do_shortcode( "[products ids='$product_ids']" ); ... } );
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Loading [products] through ajax.’ is closed to new replies.