Plugin Directory

Changeset 2352468


Ignore:
Timestamp:
08/04/2020 02:33:43 PM (5 years ago)
Author:
inperks
Message:

releasing 1.0.1

Location:
inperks-abandoned-cart-recovery/trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • inperks-abandoned-cart-recovery/trunk/includes/acbwm-core-functions.php

    r2306845 r2352468  
    309309
    310310/**
     311 * decode the json string
     312 * @param $string
     313 * @return false|mixed
     314 * @since 1.0.1
     315 */
     316function acbwm_maybe_json_decode($string)
     317{
     318    if (is_array($string)) {
     319        return $string;
     320    }
     321    $result = json_decode($string, true);
     322    if (json_last_error() === JSON_ERROR_NONE) {
     323        return $result;
     324    }
     325    return $string;
     326}
     327
     328/**
    311329 * get font family mappings
    312330 * @return array
     
    701719    return $current_lang;
    702720}
     721
     722/**
     723 * print style mappings
     724 * @param $settings
     725 * @param $font_family_mappings
     726 * @param $key
     727 * @param $map
     728 * @since 1.0.1
     729 */
     730function acbwm_print_style_mappings($settings, $font_family_mappings, $key, $map)
     731{
     732    $selector = $map[0];
     733    $property = $map[1];
     734    $value = '';
     735    if (isset($settings[$key])) {
     736        $value = $settings[$key];
     737    }
     738    if (!empty($value)) {
     739        if ($property == "background-image") {
     740            echo "$map[0] { $map[1]: url($value);background-size:cover; }\n";
     741        } else if ($property == "font-family") {
     742            echo "$map[0] { $map[1]: $font_family_mappings[$value] }\n";
     743        } else {
     744            if (!empty($value)) {
     745                echo "$map[0] { $map[1]: $value !important; }\n";
     746            }
     747        }
     748    }
     749}
  • inperks-abandoned-cart-recovery/trunk/includes/admin/class-acbwm-admin-add-ons.php

    r2306845 r2352468  
    3737                        update_option('acbwm_atc_popup', $ct_settings);
    3838                        break;
     39                    case "fortune-wheel":
     40                        $fw_settings = get_option('acbwm_fortune_wheel', array());
     41                        $fw_settings['enable_fw'] = $status;
     42                        update_option('acbwm_fortune_wheel', $fw_settings);
     43                        break;
    3944                    default:
    4045                        break;
  • inperks-abandoned-cart-recovery/trunk/includes/admin/class-acbwm-admin.php

    r2306845 r2352468  
    1111        add_action('admin_enqueue_scripts', array($this, 'enqueue_scripts'), 100);
    1212        add_action('admin_notices', array($this, 'review_notice'));
     13        add_action('admin_notices', array($this, 'get_trial_notice'));
    1314        add_action('admin_init', array($this, 'hide_review_notice'));
     15        add_action('admin_init', array($this, 'hide_trial_notice'));
    1416        add_action('wp_ajax_' . ACBWM_HOOK_PREFIX . 'create_new_email_template', 'Acbwm_Admin_Reminders::save_new_template');
    1517        add_action('wp_ajax_' . ACBWM_HOOK_PREFIX . 'send_emails_manually', 'Acbwm_Admin_Carts::send_emails_manually');
     
    2527        add_action('wp_ajax_' . ACBWM_HOOK_PREFIX . 'turn_off_scheduler_manually', 'Acbwm_Admin_Reminders::turn_off_scheduler_manually');
    2628        add_action('wp_ajax_' . ACBWM_HOOK_PREFIX . 'turn_on_scheduler_manually', 'Acbwm_Admin_Reminders::turn_on_scheduler_manually');
     29    }
     30
     31    /**
     32     * Show review wordpress
     33     */
     34    public function get_trial_notice()
     35    {
     36        if (get_option(ACBWM_PLUGIN_SLUG . '_dismiss_trial_notices', 0)) {
     37            return;
     38        }
     39        $name = str_replace('-', ' ', ACBWM_PLUGIN_SLUG);
     40        $name = ucwords($name);
     41        ?>
     42        <div class="inperks-dashboard updated" style="padding-bottom: 10px;border-left: 4px solid #2aa189">
     43            <div class="inperks-content">
     44                <form action="" method="get">
     45                    <p><?php echo esc_html__('Get 14 days trial for ', ACBWM_PLUGIN_SLUG) . '<strong>' . $name . '</strong>'; ?></p>
     46                    <p>
     47                        <a style="padding: 8px;text-decoration:none;color: #ffffff !important;border: 2px solid #2aa189;font-weight: bold;background: #2aa189;"
     48                           href="https://inperks.org/?add-to-cart=3105"
     49                           target="_blank"><?php esc_html_e('Get now', ACBWM_PLUGIN_SLUG) ?></a>
     50                        <a target="_self"
     51                           href="<?php echo esc_url(wp_nonce_url(@add_query_arg(), ACBWM_PLUGIN_SLUG . '_dismiss_trial_notices', '_inperks_trial_nonce')); ?>"><?php esc_html_e('Dismiss', ACBWM_PLUGIN_SLUG) ?></a>
     52                    </p>
     53                </form>
     54            </div>
     55        </div>
     56        <?php
    2757    }
    2858
     
    101131
    102132    /**
     133     * Hide notices
     134     */
     135    public function hide_trial_notice()
     136    {
     137        if (!current_user_can('manage_options')) {
     138            return;
     139        }
     140        $_inperks_nonce = isset($_GET['_inperks_trial_nonce']) ? wp_unslash(sanitize_text_field($_GET['_inperks_trial_nonce'])) : '';
     141        if (empty($_inperks_nonce)) {
     142            return;
     143        }
     144        if (wp_verify_nonce($_inperks_nonce, ACBWM_PLUGIN_SLUG . '_dismiss_trial_notices')) {
     145            update_option(ACBWM_PLUGIN_SLUG . '_dismiss_trial_notices', 1);
     146        }
     147    }
     148
     149    /**
    103150     * links to plugin
    104151     * @param $links
  • inperks-abandoned-cart-recovery/trunk/includes/admin/views/html-admin-page-add-ons.php

    r2306845 r2352468  
    3838        <div class="col col-3">
    3939            <div class="card">
    40                 <img src="<?php echo acbwm_get_assets_url('images/exit-intent-popup.png') ?>" alt="Add to cart popup"
     40                <img src="<?php echo acbwm_get_assets_url('images/wheel-of-fortune.png') ?>" alt="Add to cart popup"
    4141                     style="width:100%">
    4242                <div class="container">
    43                     <h4><b><?php esc_html_e('Exit intent popup', ACBWM_TEXT_DOMAIN); ?></b></h4>
    44                     <p><?php esc_html_e('Exit intent popup(Exit popup) detects a visitor is about to leave the site so you can reach them before they disappear.', ACBWM_TEXT_DOMAIN); ?></p>
     43                    <h4><b><?php esc_html_e('Wheel of fortune', ACBWM_TEXT_DOMAIN); ?></b></h4>
     44                    <p><?php esc_html_e('Get more customers to your e-commerce store with the interactive, discount-based Wheel of Fortune(Spin to Win) form.', ACBWM_TEXT_DOMAIN); ?></p>
    4545                    <?php
    46                     echo apply_filters(ACBWM_HOOK_PREFIX . 'exit_intent_popup_customization_links', '<a target="_blank" href="https://inperks.org/product/abandoned-carts-recovery-pro-for-woocommerce/" class="button button-danger">Coming Soon!</a>');
     46                    echo apply_filters(ACBWM_HOOK_PREFIX . 'wheel_of_fortune_customization_links', '<a target="_blank" href="https://inperks.org/product/abandoned-carts-recovery-pro-for-woocommerce/" class="button button-danger">Coming Soon!</a>');
    4747                    ?>
    4848                </div>
     
    5353        <div class="col col-3">
    5454            <div class="card">
    55                 <img src="<?php echo acbwm_get_assets_url('images/wheel-of-fortune.png') ?>" alt="Add to cart popup"
     55                <img src="<?php echo acbwm_get_assets_url('images/exit-intent-popup.png') ?>" alt="Add to cart popup"
    5656                     style="width:100%">
    5757                <div class="container">
    58                     <h4><b><?php esc_html_e('Wheel of fortune', ACBWM_TEXT_DOMAIN); ?></b></h4>
    59                     <p><?php esc_html_e('Get more customers to your e-commerce store with the interactive, discount-based Wheel of Fortune(Spin to Win) form.', ACBWM_TEXT_DOMAIN); ?></p>
     58                    <h4><b><?php esc_html_e('Exit intent popup', ACBWM_TEXT_DOMAIN); ?></b></h4>
     59                    <p><?php esc_html_e('Exit intent popup(Exit popup) detects a visitor is about to leave the site so you can reach them before they disappear.', ACBWM_TEXT_DOMAIN); ?></p>
    6060                    <?php
    61                     echo apply_filters(ACBWM_HOOK_PREFIX . 'wheel_of_fortune_customization_links', '<a target="_blank" href="https://inperks.org/product/abandoned-carts-recovery-pro-for-woocommerce/" class="button button-danger">Coming Soon!</a>');
     61                    echo apply_filters(ACBWM_HOOK_PREFIX . 'exit_intent_popup_customization_links', '<a target="_blank" href="https://inperks.org/product/abandoned-carts-recovery-pro-for-woocommerce/" class="button button-danger">Coming Soon!</a>');
    6262                    ?>
    6363                </div>
  • inperks-abandoned-cart-recovery/trunk/includes/class-acbwm.php

    r2306845 r2352468  
    3030     * @var string
    3131     */
    32     public $version = '1.0.0';
     32    public $version = '1.0.1';
    3333    /**
    3434     * settings
  • inperks-abandoned-cart-recovery/trunk/inperks-abandoned-cart-recovery.php

    r2306848 r2352468  
    44 * Plugin URI: https://inperks.org/product/abandoned-carts-recovery-pro-for-woocommerce/
    55 * Description: Recover lost sales immediately by sending the series of reminder emails to the customers.
    6  * Version: 1.0.0
     6 * Version: 1.0.1
    77 * Slug: inperks-abandoned-cart-recovery
    88 * Author: inperks
     
    1313 * Domain Path: /i18n/languages/
    1414 * WC requires at least: 3.7.0
    15  * WC tested up to: 4.0.1
     15 * WC tested up to: 4.3.1
    1616 */
    1717//TODO:un subscribe,
  • inperks-abandoned-cart-recovery/trunk/readme.txt

    r2306885 r2352468  
    55Requires at least: 5.3
    66Tested up to: 5.4.1
    7 Stable tag: 1.0.0
     7Stable tag: 1.0.1
    88Requires PHP: 5.6
    99License: GPL3 or later
     
    103103
    104104== Changelog ==
     105= 1.0.1 =
     106* Woocommerce tested upto 4.3.1
     107
    105108= 1.0.0 =
    106109* initial release
Note: See TracChangeset for help on using the changeset viewer.