Class Wcap_Ajax
This class contain all the ajax function used in the plugin.
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. |
public static
|
#
wcap_import_lite_data( )
This function will import the data of the lite version. Like abandoned carts, email templates, settings, sent history. |
public static
|
#
wcap_preview_email( )
This ajax create the preview email content for the without WooCommerce setting. |
public static
|
|
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. |
public static
|
#
wcap_toggle_template_status( )
It will activate and deactivate the template from the template page. |
public static
|
|
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. |
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. |
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 )
|
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 )
|
public static
|
#
wcap_toggle_atc_mandatory_status( )
It will change the status of the email field is mandatory or not. |
public static
|
#
wcap_toggle_atc_enable_status( )
It will change the status popup modal visibility on the front end. |
public static
|
|
public static
|
|
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. |
public static
|
#
wcap_change_manual_email_data( )
It will generate the selected template data and return to the ajax. |
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. |
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. |
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. |
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. |
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. |
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. |
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. |