PluginProbe
Visual Website Optimizer / 4.7
Visual Website Optimizer v4.7
trunk 1.0 2.0 2.1 2.2 2.3 2.4 2.5 2.6 2.7 2.8 2.9 3.0 3.1 3.2 3.3 3.4 3.5 3.6 3.7 3.8 3.9 4.0 4.1 4.10 All 37 releases
visual-web-optimizer / templates / remove-mini.php

remove-mini.php in Visual Website Optimizer 4.7, at templates/remove-mini.php

18 lines 862 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php defined('ABSPATH') or exit; ?>
2 $(document.body).on('click', '.remove_from_cart_button', function() {
3 console.log("click");
4 window.VWO = window.VWO || [];
5 VWO.event = VWO.event || function() {VWO.push(["event"].concat([].slice.call(arguments)));};
6 let $button = $(this);
7 let productSku = $button.data('product_sku') ? String($button.data('product_sku')) : `#${$button.data('product_id')}`;
8 let $miniCartItem = $button.closest('.mini_cart_item');
9 let productTitle = $miniCartItem.find('.product-name').text().trim() || '';
10 let price = $miniCartItem.find('.product-price').text().trim().replace(/[^0-9.]/g, '') || '';
11 let quantity = $miniCartItem.find('.qty').val() ? $miniCartItem.find('.qty').val() : '1';
12 VWO.event('woocommerce.productRemovedFromCart', {
13 productSku: productSku,
14 productTitle: productTitle,
15 quantity: parseInt(quantity)
16 });
17 });
18