Overview
  • Package
  • Class
  • Tree
  • Deprecated
  • Todo
  • Hook Reference
  • Docs Home

Packages

  • Abandoned-Cart-Pro-for-WooCommerce
    • Admin
      • Action
      • Activate-plugin
      • Component
      • I18N
      • Import-Pro
      • License
      • Menu
      • Notices
      • Popup-Modal
        • Cart-Detail
      • Recover
      • Report
      • Setting
      • Settings
      • SMS
      • Tab
      • Template
    • Ajax-Functions
    • Classes
    • Common-Functions
    • Database-Layer
    • Encrypt-Decrypt-Data
    • Frontend
      • Cart-Capture
      • Cart-Populate
      • Coupon
      • Place-Order
    • Setting
    • Update
  • None

Classes

  • Wcap_Cart_Updated

Class Wcap_Cart_Updated

It will capture the logged-in and visitor and guest users cart.

Package: Abandoned-Cart-Pro-for-WooCommerce\Frontend\Cart-Capture
Author: Tyche Softwares
Located at includes/frontend/wcap_cart_updated.php

Methods summary

public static
# wcap_store_cart_timestamp( )

It will capture the logged-in and visitor and guest users cart.

It will capture the logged-in and visitor and guest users cart.

Since

5.0

Hook

woocommerce_cart_updated
public static
# wcap_capture_logged_in_cart( integer $user_id )

It will capture the logged in users cart.

It will capture the logged in users cart.

Parameters

$user_id
string $user_id User Id

Since

5.0

Globals

mixed $wpdb
public static
# wcap_insert_new_entry_of_loggedin_user( integer $user_id, string $current_user_lang, string $loggedin_user_ip_address, array $results )

It will insert the new logged-in users cart into the database. It will insert the data immediatly after user add the product to the cart. If user has recovered last cart then it will create the new record for the user.

It will insert the new logged-in users cart into the database. It will insert the data immediatly after user add the product to the cart. If user has recovered last cart then it will create the new record for the user.

Parameters

$user_id
string $user_id User Id
$current_user_lang
User Selected language
$loggedin_user_ip_address
Ip address of the user
$results
Old record of user

Since

5.0
7.7 WCAP_DB_Layer::insert_cart_history() function used to insert data

Globals

mixed $wpdb
mixed $woocommerce
public static
# wcap_capture_cart_after_cutoff_loggedin_user( integer $user_id, string $results, string $current_user_lang, array $loggedin_user_ip_address )

It will capture the logged-in users cart after the cutoff time has been passed. It will update the old cart of the user and insert new entry in database.

It will capture the logged-in users cart after the cutoff time has been passed. It will update the old cart of the user and insert new entry in database.

Parameters

$user_id
string $user_id User Id
$results
$current_user_lang User Selected language
$current_user_lang
$loggedin_user_ip_address Ip address of the user
$loggedin_user_ip_address
$results Old record of user

Since

5.0
7.7 WCAP_DB_Layer::insert_cart_history() function used to insert data

Globals

mixed $wpdb
mixed $woocommerce
public static
# wcap_cart_capture_under_cart_cutoff_loggedin( integer $user_id, string $results, string $current_user_lang, array $loggedin_user_ip_address )

It will update the logged-in users cart under the cutoff time.

It will update the logged-in users cart under the cutoff time.

Parameters

$user_id
string $user_id User Id
$results
$current_user_lang User Selected language
$current_user_lang
$loggedin_user_ip_address Ip address of the user
$loggedin_user_ip_address
$results Old record of user

Since

5.0

Globals

mixed $wpdb
mixed $woocommerce
public static
# wcap_capture_guest_and_visitor_cart( )

It will captures the visitors and guest cart.

It will captures the visitors and guest cart.

Since

5.0

Globals

mixed $wpdb
mixed $woocommerce
public static
# wcap_capture_visitors_cart( timestamp $compare_time, json_encode $updated_cart_info, string $current_user_lang, string $visitor_user_ip_address, string $wcap_guest_cart_key )

It will captures the visitors cart from the cart page.

It will captures the visitors cart from the cart page.

Parameters

$compare_time
Time after cutoff time passed
$updated_cart_info
Updated cart of the visitor
$current_user_lang
User Selected language
$visitor_user_ip_address
Ip address of user
$wcap_guest_cart_key
WooCommerce guest session key

Since

5.0

Globals

mixed $wpdb
public static
# wcap_capture_new_visitor_cart( json_encode $cart_info, string $current_user_lang, string $visitor_user_ip_address, string $wcap_guest_cart_key )

It will insert the visitors cart to the database.

It will insert the visitors cart to the database.

Parameters

$cart_info
Updated cart of the visitor
$current_user_lang
User Selected language
$visitor_user_ip_address
Ip address of user
$wcap_guest_cart_key
WooCommerce guest session key

Since

5.0
7.7 WCAP_DB_Layer::insert_cart_history() function used to insert data

Globals

mixed $wpdb
public static
# wcap_capture_after_cutofftime_visitor_cart( json_encode $results, string $current_user_lang, string $visitor_user_ip_address, string $updated_cart_info, array $wcap_guest_cart_key )

It will capture the visitors cart after cutoff time has been reached. It will update the old cart and insert the new data in the database.

It will capture the visitors cart after cutoff time has been reached. It will update the old cart and insert the new data in the database.

Parameters

$results
$updated_cart_info Updated cart of the visitor
$current_user_lang
User Selected language
$visitor_user_ip_address
Ip address of user
$updated_cart_info
$wcap_guest_cart_key WooCommerce guest session key
$wcap_guest_cart_key
$results Old record of the user

Since

5.0
7.7 WCAP_DB_Layer::insert_cart_history() function used to insert data

Globals

mixed $wpdb
public static
# wcap_capture_within_cutofftime_visitor_cart( json_encode $results, string $current_user_lang, string $visitor_user_ip_address, string $updated_cart_info, array $wcap_guest_cart_key )

It will capture the visitors cart within cutoff time and it will update the cart in the database.

It will capture the visitors cart within cutoff time and it will update the cart in the database.

Parameters

$results
$updated_cart_info Updated cart of the visitor
$current_user_lang
User Selected language
$visitor_user_ip_address
Ip address of user
$updated_cart_info
$wcap_guest_cart_key WooCommerce guest session key
$wcap_guest_cart_key
$results Old record of the user

Since

5.0

Globals

mixed $wpdb
public static
# wcap_update_guest_cart_after_cutoff_time( integer $user_id, json_encode $updated_cart_info, string $current_user_lang, string $guest_user_ip_address )

It will capture the guest cart after cutoff time has been reached. It will update the old cart and insert the new data in the database.

It will capture the guest cart after cutoff time has been reached. It will update the old cart and insert the new data in the database.

Parameters

$user_id
string $user_id User id
$updated_cart_info
Updated cart of the visitor
$current_user_lang
User Selected language
$guest_user_ip_address
Ip address of user

Since

5.0
7.7 WCAP_DB_Layer::insert_cart_history() function used to insert data

Globals

mixed $wpdb
public static
# wcap_update_guest_cart_within_cutoff_time( integer $user_id, json_encode $updated_cart_info, string $guest_user_ip_address, string $abandoned_cart_id )

It will update the guest cart withing cutoff time.

It will update the guest cart withing cutoff time.

Parameters

$user_id
string $user_id User id
$updated_cart_info
Updated cart of the visitor
$guest_user_ip_address
$current_user_lang User Selected language
$abandoned_cart_id
$guest_user_ip_address Ip address of user

Since

5.0

Globals

mixed $wpdb
public static true
# wcap_compare_all_users_carts( json_encode $new_cart, json_encode $last_abandoned_cart )

It will compare old and new cart for the logged-in, visitors & guest users.

It will compare old and new cart for the logged-in, visitors & guest users.

Parameters

$new_cart
New cart of user
$last_abandoned_cart
old cart of user

Returns

true
| false
public static array
# wcap_array_diff_recursive( $array1, $array2 )

It will compare cart values. As we have the recursive array, we need to check all values of the cart array.

It will compare cart values. As we have the recursive array, we need to check all values of the cart array.

Returns

array
| 0 $difference Array of diffrence between old and new cart
public static
# wcap_check_shipping_charges( string $updated_cart, $existing_cart )

Checks if Shipping charges have been modified for the new and old cart. Returns true when it has been changed, else false.

Checks if Shipping charges have been modified for the new and old cart. Returns true when it has been changed, else false.

Parameters

$updated_cart
  • Updated Cart Details
$existing_cart

Since

7.7

Para

string $existing_cart - Existing Cart Details
API documentation generated by ApiGen