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

  • Class_Wcal_Ts_Tracker
  • TS_deactivate
  • TS_Faq_Support
  • ts_pro_notices
  • TS_Tracker
  • TS_tracking
  • TS_Welcome
  • TS_Woo_Active
  • WCAL_Abandoned_Orders_Table
  • Wcal_Admin_Notice
  • Wcal_Aes
  • Wcal_Aes_Ctr
  • Wcal_All_Component
  • wcal_common
  • wcal_default_template_settings
  • wcal_delete_bulk_action_handler
  • Wcal_Personal_Data_Eraser
  • Wcal_Personal_Data_Export
  • WCAL_Product_Report_Table
  • wcal_Recover_Orders_Table
  • WCAL_Templates_Table
  • Wcal_Tracking_msg
  • Wcal_TS_Tracking
  • Wcal_Welcome
  • woocommerce_abandon_cart_lite
  • woocommerce_guest_ac

Functions

  • guest_checkout_fields
  • load_ac_ajax
  • save_data
  • user_side_js
  • wcal_add_cron_schedule
  • wcal_send_email_cron
  • woocommerce_ac_delete_lite
 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 
<?php
// Exit if accessed directly
if ( ! defined( 'ABSPATH' ) ) {
    exit;
}

/**
 * It will display the admin notices for the pro version.
 *
 * @author  Tyche Softwares
 * @package Abandoned-Cart-Lite-for-WooCommerce/Admin/Admin-Notice
 */

class Wcal_Admin_Notice {

    /**
     * Show a DB Update Notice when upgrading from 4.7 to latest version
     * 
     * @since 4.8
     * 
     * @hook admin_notices
     */
    public static function wcal_show_db_update_notice(){

        if( isset( $_GET['ac_update'] ) && $_GET['ac_update'] == 'email_templates' ){
            return;
        }

        global $wpdb;

        $query_status = "SHOW FULL COLUMNS FROM " . $wpdb->prefix . "ac_email_templates_lite" . " WHERE Field = 'subject' OR Field = 'body'" ;

        $results = $wpdb->get_results( $query_status );

        foreach ( $results as $key => $value) {
            if ( $value->Collation !== 'utf8mb4_unicode_ci' ) {
                printf( __( '<div id="wcal_update" class="updated woocommerce-message" style="padding:15px;"><span>We need to update your email template database for some improvements. Please take a backup of your databases for your peice of mind</span><span class="submit"><a href="%s" class="button-primary" style="float:right;">Update</a></span></div>', 'woocommerce-abandoned-cart' ), 'admin.php?page=woocommerce_ac_page&action=listcart&ac_update=email_templates' );
                break;
            }
        }
    }
}
API documentation generated by ApiGen