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_Ajax

Class Wcap_Ajax

This class contain all the ajax function used in the plugin.

Package: Abandoned-Cart-Pro-for-WooCommerce\Ajax-Functions
Author: Tyche Softwares
Located at includes/wcap_ajax.php

Methods summary

public static
# wcap_do_not_import_lite_data( )

It will add the option to the database when admin don't wish to import the lite plugin data to pro version. It will also deactivate the lite plugin data.

It will add the option to the database when admin don't wish to import the lite plugin data to pro version. It will also deactivate the lite plugin data.

Hook

wp_ajax_wcap_do_not_import_lite_data

Since:

8.0
public static
# wcap_import_lite_data( )

This function will import the data of the lite version. Like abandoned carts, email templates, settings, sent history.

This function will import the data of the lite version. Like abandoned carts, email templates, settings, sent history.

Globals

mixed $wpdb

Hook

wp_ajax_wcap_import_lite_datas

Since:

8.0
public static
# wcap_preview_email( )

This ajax create the preview email content for the without WooCommerce setting.

This ajax create the preview email content for the without WooCommerce setting.

Hook

wp_ajax_wcap_preview_email

Since:

7.0
public static
# wcap_preview_wc_email( )

This ajax create the preview email content for the WooCommerce setting.

This ajax create the preview email content for the WooCommerce setting.

Globals

mixed $woocommerce

Hook

wp_ajax_wcap_preview_wc_email

Since:

7.0
public static
# wcap_is_atc_enable( )

This function check if the Add to Cart is enabled or not when we disabled the guest cart capturing.

This function check if the Add to Cart is enabled or not when we disabled the guest cart capturing.

Hook

wp_ajax_wcap_is_atc_enable

Since:

7.0
public static
# wcap_toggle_template_status( )

It will activate and deactivate the template from the template page.

It will activate and deactivate the template from the template page.

Since

4.8

Globals

mixed $wpdb

Hook

wp_ajax_wcap_toggle_template_status
public static
# wcap_atc_reset_setting( )

It will reset all the default configuration of the Add To Cart modal.

It will reset all the default configuration of the Add To Cart modal.

Hook

wp_ajax_wcap_atc_reset_setting

Since:

6.0
public static
# wcap_add_ajax_for_atc( )

We need to define the do_action for running the ajax on the shop page. Because the wp-ajax was not runing on the shop page. We have used the WC ajax so it can run on shop page.

We need to define the do_action for running the ajax on the shop page. Because the wp-ajax was not runing on the shop page. We have used the WC ajax so it can run on shop page.

Hook

init

Since:

6.0
public static
# wcap_atc_store_guest_email( )

We have used WC ajax because the wp-ajax was not runing on the shop page. When we run the wp-admin ajax, it was giving the 302 status of the ajax call.

We have used WC ajax because the wp-ajax was not runing on the shop page. When we run the wp-admin ajax, it was giving the 302 status of the ajax call.

Globals

mixed $wpdb
mixed $woocommerce

Hook

wp_ajax_nopriv_wcap_atc_store_guest_email

Since:

6.0
public static
# wcap_add_guest_record_for_atc( integer $user_id, json_encode $cart_info, timestamp $current_time, string $current_user_lang, string $current_user_ip_address )

This function will add the Guest user cart information in abandoned cart history table. It will check if any session reocrd is present and it is not updated cart then update / insert the record with GUEST Id.

Parameters

$user_id
string $user_id User id of the abandoned cart
$cart_info
Cart information
$current_time
Current Time
$current_user_lang
User selected language while abandoing the cart
$current_user_ip_address
Ip address of the user.

Globals

mixed $wpdb
mixed $woocommerce

Since:

6.0
public static
# wcap_add_visitor_record_for_new_session( integer $wcap_guest_user_id, json_encode $wcap_cart_info, timestamp $current_time, string $current_user_lang, string $current_user_ip_address )

It will add the visitors cart when customer do not provide the email address in Add To Cart modal. To be deprecated by v8.0

Parameters

$wcap_guest_user_id
string $wcap_guest_user_id User id of the abandoned cart
$wcap_cart_info
Cart information
$current_time
Current Time
$current_user_lang
User selected language while abandoing the cart
$current_user_ip_address
Ip address of the user.

Globals

mixed $wpdb
mixed $woocommerce

Since:

6.0
public static
# wcap_toggle_atc_mandatory_status( )

It will change the status of the email field is mandatory or not.

It will change the status of the email field is mandatory or not.

Globals

mixed $wpdb

Hook

wp_ajax_wcap_toggle_atc_mandatory_status

Since:

6.0
public static
# wcap_toggle_atc_enable_status( )

It will change the status popup modal visibility on the front end.

It will change the status popup modal visibility on the front end.

Globals

mixed $wpdb

Hook

wp_ajax_wcap_toggle_atc_enable_status

Since:

6.0
public static
# wcap_abandoned_cart_info( )

It will populate the modal detail for the abandoned cart.

It will populate the modal detail for the abandoned cart.

Since

4.8

Hook

wp_ajax_wcap_abandoned_cart_info
public static
# wcap_preview_email_sent( )

It will send the test email from the template add / edit page.

It will send the test email from the template add / edit page.

Since

1.0

Hook

wp_ajax_wcap_preview_email_sent
public static
# wcap_json_find_coupons( string $x = '', array $post_types = array( 'shop_coupon' ) )

It will search for the coupon code. It is called on the add / edit template page.

It will search for the coupon code. It is called on the add / edit template page.

Parameters

$x
$post_types
Post type which we want to search

Since

1.0

Hook

wp_ajax_wcap_json_find_coupons
public static
# wcap_change_manual_email_data( )

It will generate the selected template data and return to the ajax.

It will generate the selected template data and return to the ajax.

Hook

wp_ajax_wcap_change_manual_email_data

Since:

4.2
public static
# wcap_save_guest_data( )

It will store the guest users data in the ac_guest_abandoned_cart_history & ac_abandoned_cart_history table. It is called on the checkout page on email field.

It will store the guest users data in the ac_guest_abandoned_cart_history & ac_abandoned_cart_history table. It is called on the checkout page on email field.

Since

1.0

Globals

mixed $wpdb
mixed $woocommerce

Hook

wp_ajax_nopriv_wcap_save_guest_data
public static
# wcap_update_guest_record_on_same_last_name( string $wcap_wc_session_key, integer $wc_shipping_charges )

Update the Guest user record if we found the same last name for the same session.

Update the Guest user record if we found the same last name for the same session.

Parameters

$wcap_wc_session_key
The session key of the guest user
$wc_shipping_charges
string $wc_shipping_charges The charges of the shipping

Globals

mixed $wpdb
mixed $woocommerce

Since:

7.6
public static
# wcap_update_guest_record_on_same_first_name( string $wcap_wc_session_key, integer $wc_shipping_charges )

Update the Guest user record if we found the same first name for the same session.

Update the Guest user record if we found the same first name for the same session.

Parameters

$wcap_wc_session_key
The session key of the guest user
$wc_shipping_charges
string $wc_shipping_charges The charges of the shipping

Globals

mixed $wpdb
mixed $woocommerce

Since:

7.6
public static
# wcap_update_guest_record_on_same_email( string $wcap_wc_session_key, integer $wc_shipping_charges )

Update the Guest user reocrd if we found the same email address for the same session.

Update the Guest user reocrd if we found the same email address for the same session.

Parameters

$wcap_wc_session_key
The session key of the guest user
$wc_shipping_charges
string $wc_shipping_charges The charges of the shipping

Globals

mixed $wpdb
mixed $woocommerce

Since:

7.6
public static
# wcap_update_guest_record_on_same_phone( string $wcap_wc_session_key, integer $wc_shipping_charges )

Update the Guest user reocrd if we found the same Phone number for the same session.

Update the Guest user reocrd if we found the same Phone number for the same session.

Parameters

$wcap_wc_session_key
The session key of the guest user
$wc_shipping_charges
string $wc_shipping_charges The charges of the shipping

Globals

mixed $wpdb
mixed $woocommerce

Since:

7.6
public static
# wcap_add_guest_record_for_new_session( integer $user_id, json_encode $cart_info, timestamp $current_time, string $current_user_lang, string $current_user_ip_address )

Insert the new record for the guest user if we do not have any relevant record for the user.

Insert the new record for the guest user if we do not have any relevant record for the user.

Parameters

$user_id
string $user_id User id of the abandoned cart
$cart_info
Cart information
$current_time
Current Time
$current_user_lang
User selected language while abandoing the cart
$current_user_ip_address
Ip address of the user.

Since

6.0

Globals

mixed $wpdb
mixed $woocommerce
public static
# wcap_add_guest_record_for_same_session( integer $cart_info, json_encode $user_id, timestamp $current_time, string $current_user_lang, string $current_user_ip_address )

It will update the reocrd of the same user when we found the user data in the database.

It will update the reocrd of the same user when we found the user data in the database.

Parameters

$cart_info
string $user_id User id of the abandoned cart
$user_id
$cart_info Cart information
$current_time
Current Time
$current_user_lang
User selected language while abandoing the cart
$current_user_ip_address
Ip address of the user.

Since

6.0

Globals

mixed $wpdb
mixed $woocommerce
API documentation generated by ApiGen