Custom filter for add to cart data
-
Current Version:
- WP core: 5.8.0
- WooCommerce: 5.5.1
- WooCommerce Product Bundles: 6.11.0
- Klaviyo: 2.5.0
We use the Klaviyo plugin specifically for abandon carts. This functionality works great!!
The issue we are having is with the way the bundled products are displayed in the abandon cart emails. The price is showing $0.00 for the bundle product and the simple products are displaying the incorrect titles. The incorrect title used is the overwritten title configured for the child products of the bundle.
To resolve this issue and to prevent our client from making edits to your code, We are asking you to add a filter to the
wck_build_cart_data($cart)
function.This filter will not cause any backwards compatibility issues and should improve your integration with WooCommerce.
Replace
return $event_data;
withreturn apply_filters( 'wck_build_cart_data', $event_data, $wck_cart, $cart );
inwck-cart-rebuild.php
on line 171.That’s it!!
The page I need help with: [log in to see the link]
- The topic ‘Custom filter for add to cart data’ is closed to new replies.