Get a quick single-click solution to share your products on various social media platforms. Only at $39 $29Buy Now!
Public Ticket #1877

roni ravitz

How can I perform an action after bulk adding to cart?

is there any jsqphp hook?

wpx

wpx

Hi roni,

I hope you are doing well today. Do you want a JS trigger after adding the bulk cart?

If so, here is the trigger:

added_to_cart

Best Regards

roni ravitz

roni ravitz

is this trigger was also for the bulk add to cart,
it doesn't work for me/
can you show me a code example for using this JS trigger

wpx

wpx

Hi roni,

Sorry for the confusion. I have confirmed with the development team that there is no dedicated trigger for bulk cart events. But they asked you to try this trigger:

wc_fragment_refresh

You can try it like the following:

add_action('wp_footer', function(){
   ?>
      <script id='pvt_bulk_cart'>
         jQuery(document).on('wc_fragment_refresh', function(){
            console.log('Hello');
         });
      <script>
   <?php
}, 100);

Best Regards

roni ravitz

roni ravitz

it works great thank you very much

wpx

wpx

Hi roni,

I am delighted to hear that our support and plugin have been helpful to you. Your satisfaction is our top priority, and we are committed to providing the best possible products and services to our customers.

If you would be so kind as to leave a review of our plugin, we would greatly appreciate it. Your feedback is important to us and helps us to continue improving the quality of our products and services. You can leave a review by following this link: https://wordpress.org/support/plugin/product-variant-table-for-woocommerce/reviews/?filter=5

Your review will not only help us to improve, but it will also inspire us to continue providing the highest level of support and service to all of our customers.

Thank you for your support and for choosing our plugin.