Changeset 3241679
- Timestamp:
- 02/17/2025 08:28:41 AM (14 months ago)
- Location:
- usermaven
- Files:
-
- 8 edited
- 1 copied
-
tags/1.1.6 (copied) (copied from usermaven/trunk)
-
tags/1.1.6/README.txt (modified) (1 diff)
-
tags/1.1.6/includes/class-usermaven-woocommerce.php (modified) (6 diffs)
-
tags/1.1.6/includes/class-usermaven.php (modified) (1 diff)
-
tags/1.1.6/usermaven.php (modified) (2 diffs)
-
trunk/README.txt (modified) (1 diff)
-
trunk/includes/class-usermaven-woocommerce.php (modified) (6 diffs)
-
trunk/includes/class-usermaven.php (modified) (1 diff)
-
trunk/usermaven.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
usermaven/tags/1.1.6/README.txt
r3240213 r3241679 6 6 Tested up to: 6.7.1 7 7 Requires PHP: 5.6 8 Stable tag: 1.1. 58 Stable tag: 1.1.6 9 9 License: Massachusetts Institute of Technology (MIT) license 10 10 License URI: https://opensource.org/licenses/MIT -
usermaven/tags/1.1.6/includes/class-usermaven-woocommerce.php
r3240213 r3241679 83 83 add_action('woocommerce_checkout_order_processed', function() { 84 84 // Clear abandonment tracking when order is completed 85 WC()->session->set('checkout_started', false); 86 WC()->session->set('last_activity', null); 85 if (function_exists('WC') && WC() && WC()->session) { 86 WC()->session->set('checkout_started', false); 87 WC()->session->set('last_activity', null); 88 } 87 89 }); 88 90 … … 516 518 */ 517 519 public function maybe_track_checkout_init() { 520 // Check if WooCommerce and cart are available 521 if (!function_exists('WC') || !WC() || !WC()->cart || !WC()->session) { 522 return; 523 } 524 518 525 // Early exit conditions 519 526 if (WC()->cart->is_empty()) { … … 545 552 (function_exists('is_checkout') && is_checkout()) || 546 553 // For custom checkout pages 547 ( has_shortcode(get_post()->post_content ?? '', 'woocommerce_checkout')) ||554 (is_object(get_post()) && has_shortcode(get_post()->post_content ?? '', 'woocommerce_checkout')) || 548 555 // For AJAX checkout requests 549 556 (isset($_REQUEST['wc-ajax']) && $_REQUEST['wc-ajax'] === 'checkout') … … 680 687 */ 681 688 public function reset_checkout_tracking() { 682 WC()->session->set('usermaven_tracked_cart_hash', null); 683 WC()->session->set('usermaven_last_checkout_track_time', null); 689 if (function_exists('WC') && WC() && WC()->session) { 690 WC()->session->set('usermaven_tracked_cart_hash', null); 691 WC()->session->set('usermaven_last_checkout_track_time', null); 692 } 684 693 } 685 694 … … 1644 1653 */ 1645 1654 public function track_cart_abandonment() { 1655 if (!function_exists('WC') || !WC() || !WC()->cart || !WC()->session) { 1656 return; 1657 } 1658 1646 1659 $cart = WC()->cart; 1647 1660 if (!$cart || $cart->is_empty()) { … … 1761 1774 // Mark checkout start as activity 1762 1775 add_action('woocommerce_before_checkout_form', function() { 1763 WC()->session->set('checkout_started', true); 1776 if (function_exists('WC') && WC() && WC()->session) { 1777 WC()->session->set('checkout_started', true); 1778 } 1764 1779 $this->update_last_activity(); 1765 1780 }); -
usermaven/tags/1.1.6/includes/class-usermaven.php
r3240213 r3241679 81 81 $this->version = USERMAVEN_VERSION; 82 82 } else { 83 $this->version = '1.1. 5';83 $this->version = '1.1.6'; 84 84 } 85 85 $this->plugin_name = 'usermaven'; -
usermaven/tags/1.1.6/usermaven.php
r3240213 r3241679 19 19 * Description: The Easiest Website and Product Analytics Platform 20 20 21 * Version: 1.1. 521 * Version: 1.1.6 22 22 * Author: Usermaven 23 23 * Author URI: https://usermaven.com/ … … 38 38 * Rename this for your plugin and update it as you release new versions. 39 39 */ 40 define( 'USERMAVEN_VERSION', '1.1. 5' );40 define( 'USERMAVEN_VERSION', '1.1.6' ); 41 41 42 42 /** -
usermaven/trunk/README.txt
r3240213 r3241679 6 6 Tested up to: 6.7.1 7 7 Requires PHP: 5.6 8 Stable tag: 1.1. 58 Stable tag: 1.1.6 9 9 License: Massachusetts Institute of Technology (MIT) license 10 10 License URI: https://opensource.org/licenses/MIT -
usermaven/trunk/includes/class-usermaven-woocommerce.php
r3240213 r3241679 83 83 add_action('woocommerce_checkout_order_processed', function() { 84 84 // Clear abandonment tracking when order is completed 85 WC()->session->set('checkout_started', false); 86 WC()->session->set('last_activity', null); 85 if (function_exists('WC') && WC() && WC()->session) { 86 WC()->session->set('checkout_started', false); 87 WC()->session->set('last_activity', null); 88 } 87 89 }); 88 90 … … 516 518 */ 517 519 public function maybe_track_checkout_init() { 520 // Check if WooCommerce and cart are available 521 if (!function_exists('WC') || !WC() || !WC()->cart || !WC()->session) { 522 return; 523 } 524 518 525 // Early exit conditions 519 526 if (WC()->cart->is_empty()) { … … 545 552 (function_exists('is_checkout') && is_checkout()) || 546 553 // For custom checkout pages 547 ( has_shortcode(get_post()->post_content ?? '', 'woocommerce_checkout')) ||554 (is_object(get_post()) && has_shortcode(get_post()->post_content ?? '', 'woocommerce_checkout')) || 548 555 // For AJAX checkout requests 549 556 (isset($_REQUEST['wc-ajax']) && $_REQUEST['wc-ajax'] === 'checkout') … … 680 687 */ 681 688 public function reset_checkout_tracking() { 682 WC()->session->set('usermaven_tracked_cart_hash', null); 683 WC()->session->set('usermaven_last_checkout_track_time', null); 689 if (function_exists('WC') && WC() && WC()->session) { 690 WC()->session->set('usermaven_tracked_cart_hash', null); 691 WC()->session->set('usermaven_last_checkout_track_time', null); 692 } 684 693 } 685 694 … … 1644 1653 */ 1645 1654 public function track_cart_abandonment() { 1655 if (!function_exists('WC') || !WC() || !WC()->cart || !WC()->session) { 1656 return; 1657 } 1658 1646 1659 $cart = WC()->cart; 1647 1660 if (!$cart || $cart->is_empty()) { … … 1761 1774 // Mark checkout start as activity 1762 1775 add_action('woocommerce_before_checkout_form', function() { 1763 WC()->session->set('checkout_started', true); 1776 if (function_exists('WC') && WC() && WC()->session) { 1777 WC()->session->set('checkout_started', true); 1778 } 1764 1779 $this->update_last_activity(); 1765 1780 }); -
usermaven/trunk/includes/class-usermaven.php
r3240213 r3241679 81 81 $this->version = USERMAVEN_VERSION; 82 82 } else { 83 $this->version = '1.1. 5';83 $this->version = '1.1.6'; 84 84 } 85 85 $this->plugin_name = 'usermaven'; -
usermaven/trunk/usermaven.php
r3240213 r3241679 19 19 * Description: The Easiest Website and Product Analytics Platform 20 20 21 * Version: 1.1. 521 * Version: 1.1.6 22 22 * Author: Usermaven 23 23 * Author URI: https://usermaven.com/ … … 38 38 * Rename this for your plugin and update it as you release new versions. 39 39 */ 40 define( 'USERMAVEN_VERSION', '1.1. 5' );40 define( 'USERMAVEN_VERSION', '1.1.6' ); 41 41 42 42 /**
Note: See TracChangeset
for help on using the changeset viewer.