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

  • EDD_AC_WOO_Plugin_Updater
  • Wcap_Abandoned_Cart_Details
  • Wcap_Abandoned_Cart_List
  • Wcap_Abandoned_Orders_Table
  • Wcap_Abandoned_Trash_Orders_Table
  • Wcap_Actions
  • Wcap_Actions_Handler
  • Wcap_Activate_Plugin
  • wcap_active_license_notice
  • Wcap_Add_Cart_Popup_Modal
  • Wcap_Add_Settings
  • Wcap_Admin_Recovery
  • Wcap_Adv_settings
  • Wcap_Aes
  • Wcap_Aes_Ctr
  • Wcap_Ajax
  • Wcap_All_Component
  • Wcap_Atc_Dashboard
  • Wcap_Cart_Updated
  • Wcap_Common
  • Wcap_Coupon
  • Wcap_Dashboard
  • Wcap_Dashboard_Report
  • Wcap_Dashboard_Report_Action
  • Wcap_Dashboard_Widget
  • WCAP_Dashboard_Widget_Heartbeat
  • Wcap_Dashboard_Widget_Report
  • WCAP_DB_Layer
  • Wcap_Default_Settings
  • Wcap_Display_Notices
  • Wcap_EDD
  • Wcap_Eent_Email_List
  • Wcap_Email_Settings
  • Wcap_Email_Template_Fields
  • Wcap_Email_Template_List
  • Wcap_Import_Lite_to_Pro
  • Wcap_Load_Hooks
  • Wcap_Load_Scripts
  • Wcap_Localization
  • WCAP_Manual_Email
  • Wcap_Menu
  • WCAP_On_Placed_Order
  • Wcap_Order_Received
  • Wcap_Personal_Data_Eraser
  • Wcap_Personal_Data_Export
  • Wcap_Populate_Cart_Of_User
  • Wcap_Print_And_CSV
  • Wcap_Product_Report_List
  • Wcap_Product_Report_Table
  • Wcap_Recover_Orders_Table
  • Wcap_Recover_Trash_Orders_Table
  • Wcap_Recovered_Order_List
  • Wcap_Send_Manual_Email
  • Wcap_Sent_Emails_Table
  • Wcap_SMS
  • Wcap_SMS_Templates
  • Wcap_Templates_Table
  • Wcap_Tiny_Mce
  • WCAP_Tiny_Url
  • Wcap_Tracking_msg
  • Wcap_TS_deactivate
  • Wcap_TS_Faq_Support
  • Wcap_TS_Tracker
  • Wcap_TS_tracking
  • Wcap_TS_Welcome
  • Wcap_TS_Woo_Active
  • Wcap_Update_Check
  • Woocommerce_Abandon_Cart

Functions

  • wcap_add_notification_meta
  • wcap_get_notification_meta
  • wcap_get_notification_meta_by_key
  • wcap_get_template_status
  • wcap_update_notification_meta
  1   2   3   4   5   6   7   8   9  10  11  12  13  14  15  16  17  18  19  20  21  22  23  24  25  26  27  28  29  30  31  32  33  34  35  36  37  38  39  40  41  42  43  44  45  46  47  48  49  50  51  52  53  54  55  56  57  58  59  60  61  62  63  64  65  66  67  68  69  70  71  72  73  74  75  76  77  78  79  80  81  82  83  84  85  86  87  88  89  90  91  92  93  94  95  96  97  98  99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 
<?php
/*
* Plugin Name: Abandoned Cart Pro for WooCommerce
* Plugin URI: http://www.tychesoftwares.com/store/premium-plugins/woocommerce-abandoned-cart-pro
* Description: This plugin captures abandoned carts by logged-in users and guest users. It allows to create multiple email templates to be sent at fixed intervals. Thereby reminding customers about their abandoned orders & resulting in increased sales by completing those orders. Go to <strong>WooCommerce -> <a href="admin.php?page=woocommerce_ac_page">Abandoned Carts</a> </strong>to get started.
* Version: 7.9.1
* Author: Tyche Softwares
* Author URI: http://www.tychesoftwares.com/
* Text Domain: woocommerce-ac
* Domain Path: /i18n/languages/
* Requires PHP: 5.6
* WC requires at least: 3.0.0
* WC tested up to: 3.4.0
*
* @package Abandoned-Cart-Pro-for-WooCommerce
*/


global $ACUpdateChecker;
$ACUpdateChecker = '7.9.1';

/**
 * This is the URL our updater / license checker pings. This should be the URL of the site with EDD installed.
 * IMPORTANT: change the name of this constant to something unique to prevent conflicts with other plugins using this system.
 */ 
define( 'EDD_SL_STORE_URL_AC_WOO', 'http://www.tychesoftwares.com/' );

/**
 * The name of your product. This is the title of your product in EDD and should match the download title in EDD exactly.
 * IMPORTANT: change the name of this constant to something unique to prevent conflicts with other plugins using this system.
 */ 
define( 'EDD_SL_ITEM_NAME_AC_WOO', 'Abandoned Cart Pro for WooCommerce' );

if( ! class_exists( 'EDD_AC_WOO_Plugin_Updater' ) ) {
    // load our custom updater if it doesn't already exist
    include( dirname( __FILE__ ) . '/plugin-updates/EDD_AC_WOO_Plugin_Updater.php' );
}
/**
 * Retrieve our license key from the DB
 */ 
$license_key = trim( get_option( 'edd_sample_license_key_ac_woo' ) );
/**
 * Setup the updater
 */ 
$edd_updater = new EDD_AC_WOO_Plugin_Updater( EDD_SL_STORE_URL_AC_WOO, __FILE__, array(
        'version'   => '7.9.1',                     // current version number
        'license'   => $license_key,                // license key (used get_option above to retrieve from DB)
        'item_name' => EDD_SL_ITEM_NAME_AC_WOO,     // name of this plugin
        'author'    => 'Ashok Rane'                 // author of this plugin
        )
);

/**
 * Woocommerce_Abandon_Cart class
 */
if ( ! class_exists( 'Woocommerce_Abandon_Cart' ) ) {

    /**
     * It will call all the functions for the file inclusion, global variable and action & filter
     * @since 1.0
     */
    class Woocommerce_Abandon_Cart {
        public  $one_hour;
        public  $three_hours;
        public  $six_hours;
        public  $twelve_hours;
        public  $one_day;
        public  $one_week;
        public  $duration_range_select = array();
        public  $start_end_dates = array();

        /**
         * It will call all the functions for the file inclusion, global variable and action & filter
         */
        public function __construct() {

            $this->wcap_declare_variable();
            $this->wcap_load_files();

            // Initialize settings
            register_activation_hook( __FILE__, array( 'Wcap_Activate_Plugin', 'wcap_activate' ) );

            $this->wcap_load_hooks();
        }

        /**
         * Declare the common variables and the constants needed for the plugin.
         * @since 5.0
         */
        function wcap_declare_variable (){

            $this->one_hour     = 60 * 60;
            $this->three_hours  = 3  * $this->one_hour;
            $this->six_hours    = 6  * $this->one_hour;
            $this->twelve_hours = 12 * $this->one_hour;
            $this->one_day      = 24 * $this->one_hour;
            $this->one_week     = 7  * $this->one_day;
            $this->duration_range_select = array(
                    'yesterday'         => __( 'Yesterday',    'woocommerce-ac' ),
                    'today'             => __( 'Today',        'woocommerce-ac' ),
                    'last_seven'        => __( 'Last 7 days',  'woocommerce-ac' ),
                    'last_fifteen'      => __( 'Last 15 days', 'woocommerce-ac' ),
                    'last_thirty'       => __( 'Last 30 days', 'woocommerce-ac' ),
                    'last_ninety'       => __( 'Last 90 days', 'woocommerce-ac' ),
                    'last_year_days'    => __( 'Last 365',     'woocommerce-ac' ) );

            $this->start_end_dates = array(
                'yesterday'     => array( 'start_date' => date( "d M Y", ( current_time('timestamp') - 24*60*60 ) ), 'end_date' => date( "d M Y", ( current_time( 'timestamp' ) - 7*24*60*60 ) ) ),

                'today'         => array( 'start_date' => date( "d M Y", ( current_time( 'timestamp' ) ) ), 'end_date' => date( "d M Y", ( current_time( 'timestamp' ) ) ) ),

                'last_seven'    => array( 'start_date' => date( "d M Y", ( current_time( 'timestamp' ) - 7*24*60*60 ) ), 'end_date' => date( "d M Y", ( current_time( 'timestamp' ) ) ) ),

                'last_fifteen'  => array( 'start_date' => date( "d M Y", ( current_time( 'timestamp' ) - 15*24*60*60 ) ), 'end_date' => date( "d M Y", ( current_time( 'timestamp' ) ) ) ),

                'last_thirty'   => array( 'start_date' => date( "d M Y", ( current_time( 'timestamp' ) - 30*24*60*60 ) ), 'end_date' => date( "d M Y", ( current_time( 'timestamp' ) ) ) ),

                'last_ninety'   => array( 'start_date' => date( "d M Y", ( current_time( 'timestamp' ) - 90*24*60*60 ) ), 'end_date' => date( "d M Y", ( current_time( 'timestamp' ) ) ) ),

                'last_year_days'=> array( 'start_date' => date( "d M Y", ( current_time( 'timestamp' ) - 365*24*60*60 ) ) , 'end_date' => date( "d M Y", ( current_time( 'timestamp' ) ) ) ) );

            /**
             * Define The constants for plugin table names and other constants.
             */ 
            Woocommerce_Abandon_Cart::wcap_define_constants_for_table_and_other();
        }

        /**
         * Define The constants for plugin table names and other constants.
         * @globals mixed $wpdb
         * @since 5.0
         */
        function wcap_define_constants_for_table_and_other (){

            global $wpdb;

            if ( !defined( 'WCAP_ABANDONED_CART_HISTORY_TABLE' ) ) {
                define('WCAP_ABANDONED_CART_HISTORY_TABLE', $wpdb->prefix . "ac_abandoned_cart_history" );
            }

            if ( !defined( 'WCAP_GUEST_CART_HISTORY_TABLE' ) ) {
                define('WCAP_GUEST_CART_HISTORY_TABLE'    , $wpdb->prefix . "ac_guest_abandoned_cart_history" );
            }

            if ( !defined( 'WCAP_EMAIL_TEMPLATE_TABLE' ) ) {
                define('WCAP_EMAIL_TEMPLATE_TABLE'        , $wpdb->prefix . "ac_email_templates" );
            }

            if ( !defined( 'WCAP_EMAIL_CLICKED_TABLE' ) ) {
                define('WCAP_EMAIL_CLICKED_TABLE'         , $wpdb->prefix . "ac_link_clicked_email" );
            }

            if ( !defined( 'WCAP_EMAIL_OPENED_TABLE' ) ) {
                define('WCAP_EMAIL_OPENED_TABLE'          , $wpdb->prefix . "ac_opened_emails" );
            }

            if ( !defined( 'WCAP_EMAIL_SENT_HISTORY_TABLE' ) ) {
                define('WCAP_EMAIL_SENT_HISTORY_TABLE'    , $wpdb->prefix . "ac_sent_history" );
            }

            if ( !defined( 'WCAP_PLUGIN_FILE' ) ) {
                define('WCAP_PLUGIN_FILE'                 , __FILE__ );
            }

            if ( !defined( 'WCAP_PLUGIN_URL' ) ) {
                define('WCAP_PLUGIN_URL'                 , untrailingslashit(plugins_url('/', __FILE__)) );
            }

            if ( !defined( 'WCAP_ADMIN_URL' ) ) {
                define('WCAP_ADMIN_URL'                   , admin_url( 'admin.php' ) );
            }

            if ( !defined( 'WCAP_ADMIN_AJAX_URL' ) ) {
                define('WCAP_ADMIN_AJAX_URL'              , admin_url( 'admin-ajax.php' ) );
            }

            if ( !defined( 'WCAP_PLUGIN_PATH' ) ) {
                define('WCAP_PLUGIN_PATH'                 , untrailingslashit(plugin_dir_path(__FILE__)) );
            }
            
            if( !defined( 'WCAP_NOTIFICATIONS' ) ) {
                define( 'WCAP_NOTIFICATIONS'    , $wpdb->prefix . "ac_notifications" );
            }
            
            
            if( !defined( 'WCAP_NOTIFICATIONS_META' ) ) {
                define( 'WCAP_NOTIFICATIONS_META'    , $wpdb->prefix . "ac_notifications_meta" );
            }
            
            if( !defined( 'WCAP_TINY_URLS' ) ) {
                define( 'WCAP_TINY_URLS'    , $wpdb->prefix . "ac_tiny_urls" );
            }
        }

        /**
         * Load all files needed for the plugin.
         * @globals string $pagenow Name of the current page
         * @since 5.0
         */
        function wcap_load_files( ) {

            /**
             * Load only admin side  files.
             */
            global $pagenow;

            require_once( "includes/wcap_activate_plugin.php" );
            require_once( "includes/wcap_update_check.php" );

            // This condition confirm that the lite plugin active, so we need to perform further action.
            if ( in_array( 'woocommerce-abandoned-cart/woocommerce-ac.php', (array) get_option( 'active_plugins', array() ) ) || 
                ( isset( $_GET ['wcap_plugin_link'] ) && 'wcap-update' == $_GET ['wcap_plugin_link'] ) ) {
                require_once( "includes/admin/wcap_import_lite_to_pro.php" );
            }

            require_once( "includes/wcap_load_hooks.php" );
            require_once( "includes/wcap_load_scripts.php" );
            require_once( "includes/wcap_default_settings.php" );
            require_once( "includes/wcap_common.php" );
            require_once( "includes/wcap_functions.php" );
            require_once( "includes/wcap_ajax.php" );
            
            // Database interaction file
            require_once( "includes/wcap_database_layer.php" );

            // Files for Advance Settings & SMS Reminders
            require_once( 'includes/admin/wcap_sms_reminders.php' );
            require_once( 'includes/admin/wcap_advance_settings.php' );
            
            $is_admin = is_admin();

            if ( true === $is_admin ) {
                require_once( "includes/admin/wcap_menu.php" );

                require_once( "includes/admin/wcap_abandoned_cart_details.php" );
                require_once( "includes/wcap_all_component.php" );

                // Files for Personal Data Export & Erasure
                require_once( 'includes/admin/wcap_privacy_export.php' );
                require_once( 'includes/admin/wcap_privacy_erase.php' );
                
            }

            if ( true === $is_admin && (
                ( isset( $_GET['page'] ) && "woocommerce_ac_page" === $_GET['page'] ) || 
                  ( isset( $_POST[ 'option_page' ] ) && 
                    ( 'woocommerce_ac_settings' === $_POST[ 'option_page' ] || 
                      'woocommerce_ac_cron_settings' === $_POST[ 'option_page' ] || 
                      'woocommerce_ac_restrict_settings' === $_POST[ 'option_page' ] ||
                      'woocommerce_sms_settings' === $_POST[ 'option_page' ] ) 
                  )
                )
                ) {
                Woocommerce_Abandon_Cart::wcap_load_admin_side_files();

                /**
                 * Load class files.
                 */ 
                Woocommerce_Abandon_Cart::wcap_load_support_class_files();
            } elseif ( true === $is_admin && ( 'index.php' === $pagenow || 'admin-ajax.php' === $pagenow ) ) {
                Woocommerce_Abandon_Cart::wcap_load_dashboard_widget_files();
            }

            /**
             * Load front side files.
             */
            if( false === $is_admin ) {
                Woocommerce_Abandon_Cart::wcap_load_front_side_files();
            }

            require_once( "includes/classes/class_wcap_aes.php" );
            require_once( "includes/classes/class_wcap_aes_ctr.php" );

            require_once( "includes/admin/wcap_admin_recovery.php" );
            
            /**
             * Load cart details file.
             */ 
            $wcap_auto_cron = get_option ( 'wcap_use_auto_cron');
            if ( isset( $wcap_auto_cron ) && $wcap_auto_cron != false && '' != $wcap_auto_cron ) {
                require_once( "cron/wcap_send_email_using_cron.php" );
            }
        }

        /**
         * Load files which needed in the admin side.
         * @since 5.0
         */
        function wcap_load_admin_side_files(){
            
            require_once( "includes/admin/wcap_add_settings.php" );
            require_once( "includes/admin/wcap_actions.php" );
            require_once( "includes/admin/wcap_actions_handler.php" );
            require_once( "includes/admin/wcap_display_notices.php" );
            require_once( "includes/admin/wcap_email_settings.php" );
            require_once( "includes/admin/wcap_dashboard.php" );
            require_once( "includes/admin/wcap_abandoned_cart_list.php" );
            require_once( "includes/admin/wcap_email_template_list.php" );
            require_once( "includes/admin/wcap_recovered_order_list.php" );
            require_once( "includes/admin/wcap_sent_email_list.php" );
            require_once( "includes/admin/wcap_email_template_fields.php" );
            require_once( "includes/admin/wcap_product_report_list.php" );
            require_once( "includes/admin/wcap_tiny_mce.php" );
            require_once( "includes/admin/wcap_localization.php" );
            require_once( "includes/admin/wcap_edd.php" );
            require_once( "includes/admin/wcap_print_and_csv.php" );
            require_once( "includes/admin/wcap_add_cart_popup_modal.php" );
        }

        /**
         * Load files needed for the front end.
         * @since 5.0
         */
        function wcap_load_front_side_files() {
            require_once( "includes/frontend/wcap_cart_updated.php" );
            require_once( "includes/frontend/wcap_order_received.php" );
            require_once( "includes/frontend/wcap_populate_cart_of_user.php" );
            require_once( "includes/frontend/wcap_on_placed_order.php" );
            require_once( "includes/frontend/wcap_coupon_code.php" );
            require_once( 'includes/frontend/wcap_data_tracking_message.php' );
            require_once( 'includes/wcap_tiny_url.php' );
        }

        /**
         * Load the supporting class files.
         * @since 5.0
         */
        function wcap_load_support_class_files(){
            
            require_once( "includes/classes/class_wcap_manual_email.php" );
            require_once( "includes/classes/class_wcap_send_manual_email.php" );
            require_once( "includes/classes/class_wcap_dashboard_report_action.php" );
            require_once( "includes/classes/class_wcap_abandoned_orders_table.php" );
            require_once( "includes/classes/class_wcap_abandoned_trash_orders_table.php" );
            require_once( "includes/classes/class_wcap_templates_table.php" );
            require_once( "includes/classes/class_wcap_recover_orders_table.php" );
            require_once( "includes/classes/class_wcap_recover_trash_orders_table.php" );
            require_once( "includes/classes/class_wcap_sent_emails_table.php" );
            
            require_once( "includes/classes/class_wcap_product_report_table.php" );
            require_once( "includes/classes/class_wcap_atc_dashboard.php" );
            require_once( 'includes/classes/class_wcap_sms_templates_table.php' );
        }

        /**
         * Loads the dashboard widget files.
         * @since 5.0
         */
        function wcap_load_dashboard_widget_files() {
            require_once( "includes/admin/wcap_dashboard_widget.php" );
            require_once( "includes/classes/class_wcap_dashboard_widget_report.php" );
            require_once( "includes/classes/class_wcap_dashboard_widget_heartbeat.php" );
        }

        /**
         * It will load all the hooks needed for the plugin.
         * @since 5.0
         */
        function wcap_load_hooks (){
            Wcap_Load_Hooks::wcap_load_hooks_and_filters();
        }
    }
}
$woocommerce_abandon_cart = new Woocommerce_Abandon_Cart();
?>
API documentation generated by ApiGen