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

Packages

  • Abandoned-Cart-Lite-for-WooCommerce
    • Admin
      • Admin-Action
      • Admin-Notice
      • Component
      • Default-Template
      • List-Class
      • Tracking-Data
      • Welcome-Page
    • Common-Functions
    • Core
    • Cron
    • Encrypt-Decrypt-Data
    • Frontend
      • Capture-Guest-Cart
    • Tracking
    • Uninstaller
  • None

Classes

  • woocommerce_abandon_cart_lite

Class woocommerce_abandon_cart_lite

It will add the hooks, filters, menu and the variables and all the necessary actions for the plguins which will be used all over the plugin.

Package: Abandoned-Cart-Lite-for-WooCommerce\Core
Since: 1.0
Located at woocommerce-ac.php

Methods summary

public
# __construct( )

The constructor will add the hooks, filters and the variable which will be used all over the plugin.

The constructor will add the hooks, filters and the variable which will be used all over the plugin.

Since

1.0
public static array
# wcal_deactivate_add_questions( array $wcal_add_questions )

It will add the Questions while admin deactivate the plugin.

It will add the Questions while admin deactivate the plugin.

Parameters

$wcal_add_questions
Blank array

Returns

array
$wcal_add_questions List of all questions.

Hook

ts_deativate_plugin_questions
public static
# wcal_order_placed( integer $order_id )

When customer clicks on the "Place Order" button on the checkout page, it will identify if we need to keep that cart or delete it.

When customer clicks on the "Place Order" button on the checkout page, it will identify if we need to keep that cart or delete it.

Parameters

$order_id
string $order_id Order id

Since

3.4

Globals

mixed $wpdb
mixed $woocommerce

Hook

woocommerce_checkout_order_processed
public string
# wcal_order_complete_action( string $order_status, integer $order_id )

It will check the WooCommerce order status. If the order status is pending or failed the we will keep that cart record as an abandoned cart. It will be executed after order placed.

It will check the WooCommerce order status. If the order status is pending or failed the we will keep that cart record as an abandoned cart. It will be executed after order placed.

Parameters

$order_status
Order Status
$order_id
string $order_id Order Id

Returns

string
$order_status

Since

3.4

Globals

mixed $wpdb
mixed $woocommerce

Hook

woocommerce_payment_complete_order_status
public
# wcal_preview_emails( )

It will ganerate the preview email template.

It will ganerate the preview email template.

Since

2.5

Globals

mixed $woocommerce

Hook

admin_init
public
# wcal_update_po_file( )

In this version we have allowed customer to transalte the plugin string using .po and .pot file.

In this version we have allowed customer to transalte the plugin string using .po and .pot file.

Returns


$loaded

Since

1.6

Hook

init
public
# wcal_activate( )

It will create the plugin tables & the options reqired for plugin.

It will create the plugin tables & the options reqired for plugin.

Since

1.0

Globals

mixed $wpdb

Hook

register_activation_hook
public
# wcal_initialize_plugin_options( )

It will add the section, field, & registres the plugin fields using Settings API.

It will add the section, field, & registres the plugin fields using Settings API.

Since

2.5

Hook

admin_init
public
# ac_lite_general_options_callback( )

Settings API callback for section "ac_lite_general_settings_section".

Settings API callback for section "ac_lite_general_settings_section".

Since

2.5
public
# ac_lite_cart_abandoned_time_callback( array $args )

Settings API callback for cart time field.

Settings API callback for cart time field.

Parameters

$args
Arguments

Since

2.5
public integer
# ac_lite_cart_time_validation( integer $input )

Settings API cart time field validation.

Settings API cart time field validation.

Parameters

$input
string $input

Returns

integer
| string $output

Since

2.5
public
# ac_lite_email_admin_on_recovery( array $args )

Settings API callback for email admin on cart recovery field.

Settings API callback for email admin on cart recovery field.

Parameters

$args
Arguments

Since

2.5
public
# wcal_track_guest_cart_from_cart_page_callback( array $args )

Settings API callback for capturing guest cart which do not reach the checkout page.

Settings API callback for capturing guest cart which do not reach the checkout page.

Parameters

$args
Arguments

Since

2.7
public static
# wcal_guest_cart_capture_msg_callback( array $args )

Call back function for guest user cart capture message

Call back function for guest user cart capture message

Parameters

$args
Argument for adding field details

Since

7.8
public static
# wcal_logged_cart_capture_msg_callback( array $args )

Call back function for registered user cart capture message

Call back function for registered user cart capture message

Parameters

$args
Argument for adding field details

Since

7.8
public
# wcal_email_callback( )

Settings API callback for Abandoned cart email settings of the plugin.

Settings API callback for Abandoned cart email settings of the plugin.

Since

3.5
public static
# wcal_from_name_callback( array $args )

Settings API callback for from name used in Abandoned cart email.

Settings API callback for from name used in Abandoned cart email.

Parameters

$args
Arguments

Since

3.5
public static
# wcal_from_email_callback( array $args )

Settings API callback for from email used in Abandoned cart email.

Settings API callback for from email used in Abandoned cart email.

Parameters

$args
Arguments

Since

3.5
public static
# wcal_reply_email_callback( array $args )

Settings API callback for reply email used in Abandoned cart email.

Settings API callback for reply email used in Abandoned cart email.

Parameters

$args
Arguments

Since

3.5
public
# wcal_update_db_check( )

It will be executed when the plugin is upgraded.

It will be executed when the plugin is upgraded.

Since

1.0

Globals

mixed $wpdb

Hook

admin_init
public static
# wcal_email_admin_recovery_for_paypal( integer $order_id, string $old, string $new_status )

Send email to admin when cart is recovered only via PayPal.

Send email to admin when cart is recovered only via PayPal.

Parameters

$order_id
string $order_id Order id
$old
Old status
$new_status
New status

Since

2.9

Globals

mixed $wpdb
mixed $woocommerce

Hook

woocommerce_order_status_changed
public
# wcal_email_admin_recovery( integer $order_id )

Send email to admin when cart is recovered via any other payment gateway other than PayPal.

Send email to admin when cart is recovered via any other payment gateway other than PayPal.

Parameters

$order_id
string $order_id Order id

Since

2.3

Globals

mixed $wpdb
mixed $woocommerce

Hook

woocommerce_order_status_pending_to_processing_notification
woocommerce_order_status_pending_to_completed_notification
woocommerce_order_status_pending_to_on-hold_notification
woocommerce_order_status_failed_to_processing_notification
woocommerce_order_status_failed_to_completed_notification
public static boolean
# wcal_check_order_is_recovered( integer $wcal_order_id )

For sending Recovery Email to Admin, we will check that order is recovered or not.

For sending Recovery Email to Admin, we will check that order is recovered or not.

Parameters

$wcal_order_id
string $wcal_order_id Order id

Returns

boolean
true | false

Since

2.3

Globals

mixed $wpdb
public
# wcal_admin_menu( )

Add a submenu page under the WooCommerce.

Add a submenu page under the WooCommerce.

Since

1.0

Hook

admin_menu
public
# wcal_store_cart_timestamp( )

Capture the cart and insert the information of the cart into DataBase.

Capture the cart and insert the information of the cart into DataBase.

Since

1.0

Globals

mixed $wpdb
mixed $woocommerce

Hook

woocommerce_cart_updated
public string
# wcal_email_unsubscribe( string $args )

It will unsubscribe the abandoned cart, so user will not recieve further abandoned cart emails.

It will unsubscribe the abandoned cart, so user will not recieve further abandoned cart emails.

Parameters

$args
Arguments

Returns

string
$args

Since

2.9

Globals

mixed $wpdb

Hook

template_include
public string
# wcal_email_track_links( string $template )

It will track the URL of cart link from email, and it will populate the logged-in and guest users cart.

It will track the URL of cart link from email, and it will populate the logged-in and guest users cart.

Parameters

$template

Returns

string
$template

Since

1.0

Globals

mixed $wpdb
mixed $woocommerce

Hook

template_include
public
# wcal_load_guest_persistent_cart( )

When customer clicks on the abandoned cart link and that cart is for the the guest users the it will load the guest user's cart detail.

When customer clicks on the abandoned cart link and that cart is for the the guest users the it will load the guest user's cart detail.

Since

1.0

Globals

mixed $woocommerce
public boolean
# wcal_compare_only_guest_carts( json_encode $new_cart, json_encode $last_abandoned_cart )

It will compare only guest users cart while capturing the cart.

It will compare only guest users cart while capturing the cart.

Parameters

$new_cart
New abandoned cart details
$last_abandoned_cart
Old abandoned cart details

Returns

boolean
true | false

Since

1.0
public boolean
# wcal_compare_carts( integer $user_id, json_encode $last_abandoned_cart )

It will compare only loggedin users cart while capturing the cart.

It will compare only loggedin users cart while capturing the cart.

Parameters

$user_id
string $user_id User id
$last_abandoned_cart
Old abandoned cart details

Returns

boolean
true | false

Since

1.0
public
# wcal_action_after_delivery_session( array $order )

When user places the order and reach the order recieved page, then it will check if it is abandoned cart and subsequently recovered or not.

When user places the order and reach the order recieved page, then it will check if it is abandoned cart and subsequently recovered or not.

Parameters

$order
object $order Order details

Since

1.0

Globals

mixed $wpdb
mixed $woocommerce

Hook

woocommerce_order_details_after_order_table
public
# wcal_action_admin_init( )

It will add the wp editor for email body on the email edit page.

It will add the wp editor for email body on the email edit page.

Since

2.6

Hook

admin_init
public array
# wcal_filter_mce_button( array $buttons )

It will create a button on the WordPress editor.

It will create a button on the WordPress editor.

Parameters

$buttons

Returns

array
$buttons

Since

2.6

Hook

mce_buttons
public array
# wcal_filter_mce_plugin( array $plugins )

It will add the list for the added extra button.

It will add the list for the added extra button.

Parameters

$plugins

Returns

array
$plugins

Since

2.6

Hook

mce_external_plugins
public
# wcal_display_tabs( )

It will add the tabs on the Abandoned cart page.

It will add the tabs on the Abandoned cart page.

Since

1.0
public
# wcal_enqueue_scripts_js( string $hook )

It will add the scripts needed for the plugin.

It will add the scripts needed for the plugin.

Parameters

$hook
Name of hook

Since

1.0

Hook

admin_enqueue_scripts
public array
# wcal_format_tiny_MCE( array $in )

It will add the parameter to the editor.

It will add the parameter to the editor.

Parameters

$in

Returns

array
$in

Since

2.6

Hook

tiny_mce_before_init
public
# wcal_enqueue_scripts_css( string $hook )

It will add the necesaary css for the plugin.

It will add the necesaary css for the plugin.

Parameters

$hook
Name of page

Since

1.0

Hook

admin_enqueue_scripts
public
# wcal_app_output_buffer( )

When we have added the wp list table for the listing then while deleting the record with the bulk action it was showing the notice. To overcome the wp redirect warning we need to start the ob_start.

When we have added the wp list table for the listing then while deleting the record with the bulk action it was showing the notice. To overcome the wp redirect warning we need to start the ob_start.

Since

2.5.2

Hook

init
public
# wcal_menu_page( )

Abandon Cart Settings Page. It will show the tabs, notices for the plugin. It will also update the template records and display the template fields. It will also show the abandoned cart details page. It will also show the details of all the tabs.

Abandon Cart Settings Page. It will show the tabs, notices for the plugin. It will also update the template records and display the template fields. It will also show the abandoned cart details page. It will also show the details of all the tabs.

Since

1.0

Globals

mixed $wpdb
public string
# wcal_admin_footer_text( string $footer_text )

It will add the footer text for the plugin.

It will add the footer text for the plugin.

Parameters

$footer_text
Text

Returns

string
$footer_text

Since

1.0

Hook

admin_footer_text
public array
# bubble_sort_function( array $unsort_array, string $order )

It will sort the record for the product reports tab.

It will sort the record for the product reports tab.

Parameters

$unsort_array
Unsorted array
$order
Order details

Returns

array
$array

Since

2.6
public
# wcal_action_send_preview( )

It will be called when we send the test email from the email edit page.

It will be called when we send the test email from the email edit page.

Since

1.0

Hook

wp_ajax_wcal_preview_email_sent
public static
# wcal_toggle_template_status( )

It will update the template satus when we change the template active status from the email template list page.

It will update the template satus when we change the template active status from the email template list page.

Since

4.4

Globals

mixed $wpdb

Hook

wp_ajax_wcal_toggle_template_status
public string
# wcal_preview_email_sent( )

It will replace the test email data with the static content.

It will replace the test email data with the static content.

Returns

string
email sent | not sent

Since

1.0

Properties summary

public $one_hour
#
public $three_hours
#
public $six_hours
#
public $twelve_hours
#
public $one_day
#
public $one_week
#
public array $duration_range_select
# array()
public array $start_end_dates
# array()
API documentation generated by ApiGen