Plugin Directory

Changeset 2176202


Ignore:
Timestamp:
10/19/2019 08:39:28 PM (6 years ago)
Author:
dragosmicu
Message:

Hot fix. Added version 1.1.1.

Location:
wootomation/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • wootomation/trunk/includes/class-admin.php

    r2176195 r2176202  
    6363
    6464    public function wootomation_suggestions_per_page(){
    65         $option = esc_attr( get_option('wootomation_suggestions_per_page') );
     65        $option = esc_attr( get_site_option('wootomation_suggestions_per_page') );
    6666        echo '<input type="number" name="wootomation_suggestions_per_page" value="'.$option.'" placeholder="3" />';
    6767    }
    6868
    6969    public function wootomation_after_cart_table(){
    70         $option = esc_attr( get_option('wootomation_after_cart_table') );
     70        $option = esc_attr( get_site_option('wootomation_after_cart_table') );
    7171        $html = '<label class="switch">';
    7272            $html .= '<input type="checkbox" name="wootomation_after_cart_table" value="1"' . checked( 1, $option, false ) .  '/>';
     
    7777
    7878    public function wootomation_after_cart_table_title(){
    79         $option = esc_attr( get_option('wootomation_after_cart_table_title') );
     79        $option = esc_attr( get_site_option('wootomation_after_cart_table_title') );
    8080        echo '<input type="text" name="wootomation_after_cart_table_title" value="'.$option.'" placeholder="People who bought this, also bought…" class="regular-text" />';
    8181    }
  • wootomation/trunk/readme.txt

    r2176195 r2176202  
    3939== Changelog ==
    4040
     41= 1.1.1 =
     42* Added multisite support.
     43
    4144= 1.1.0 =
    4245* Added settings page.
     
    5255== Upgrade Notice ==
    5356
     57= 1.1.1 =
     58Added multisite support.
     59
    5460= 1.1.0 =
    5561Upgrade now to take advantage of the new settings page! Also fixed a bug for new stores.
  • wootomation/trunk/wootomation.php

    r2176200 r2176202  
    44 * Plugin URI: https://wordpress.org/support/plugin/wootomation/
    55 * Description: 🤖 Increase the sales of your WooCommerce shop by suggesting the right products to your customers, with the help of Machine Learning Artificial Intelligence. To take advantage of its power, just install and activate, it works out of the box.
    6  * Version: 1.1.0
    7  * Stable tag: 1.1.0
     6 * Version: 1.1.1
     7 * Stable tag: 1.1.1
    88 * Author: Dragos Micu
    99 * Author URI: https://wordpress.org/support/users/dragosmicu/
     
    3232            $this->plugin_name = plugin_basename( __FILE__ );
    3333            $this->ajax_url = admin_url('admin-ajax.php');
    34             $this->suggestions_per_page = get_option('wootomation_suggestions_per_page') ? get_option('wootomation_suggestions_per_page') : 3;
    35             $this->location = esc_attr( get_option('wootomation_after_cart_table') );
     34            $this->suggestions_per_page = get_site_option('wootomation_suggestions_per_page') ? get_site_option('wootomation_suggestions_per_page') : 3;
     35            $this->location = esc_attr( get_site_option('wootomation_after_cart_table') );
    3636            $this->titles = apply_filters( 'wootomation_titles', array(
    37                 'wootomation_after_cart_table_title' => get_option('wootomation_after_cart_table_title') ? get_option('wootomation_after_cart_table_title') : "People who bought this, also bought&hellip;",
     37                'wootomation_after_cart_table_title' => get_site_option('wootomation_after_cart_table_title') ? get_site_option('wootomation_after_cart_table_title') : "People who bought this, also bought&hellip;",
    3838            ));
    3939
     
    8181        public function deactivate() {
    8282            flush_rewrite_rules();
     83            delete_site_option( 'wt-donate' );
     84            delete_site_option( 'wt-hide-review' );
    8385        }
    8486
     
    8890        public function wt_admin_notices() {
    8991            // Adds notice of require WooCommerce plugin
    90             if( !in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) )  || !class_exists('WooCommerce') ){
     92            if( !in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', get_site_option( 'active_plugins' ) ) )  || !class_exists('WooCommerce') ){
    9193                ?>
    9294                <div class="notice-warning settings-error notice">
     
    9698            }
    9799            // Check and display on install notices
    98             if( get_transient( 'wt-admin-notices-on-install' ) ){
     100            if( get_site_transient( 'wt-admin-notices-on-install' ) ){
    99101                ?>
    100102                <div class="updated woocommerce-message woocommerce-admin-promo-messages is-dismissible">
     
    104106                <?php
    105107                /* Delete transient, only display this notice once. */
    106                 delete_transient( 'wt-admin-notices-on-install' );
     108                delete_site_transient( 'wt-admin-notices-on-install' );
    107109            }
    108110            // Check and display after one month notices
    109             if( !get_transient( 'wt-admin-notices-after-one-month' ) ){
     111            if( !get_site_transient( 'wt-admin-notices-after-one-month' ) ){
    110112                // check if wt-hide-review option doesn't exist
    111                 if( false === get_option('wt-hide-review' ) ) {
     113                if( false === get_site_option('wt-hide-review' ) ) {
    112114                    // then check for "Dismiss" GET request
    113115                    if( isset( $_GET['wt-hide-review'] ) ):
    114116                        // If GET request to hide notice exists, add option
    115117                        if( $_GET['wt-hide-review'] === 'true' ):
    116                             add_option('wt-hide-review', 'true');
     118                            add_site_option('wt-hide-review', 'true');
    117119                        endif;
    118120                    // If GET request doesn't exist, continue displaying notice
     
    126128            }
    127129            // Check and display after two months notices
    128             if( !get_transient( 'wt-admin-notices-after-two-months' ) ){
     130            if( !get_site_transient( 'wt-admin-notices-after-two-months' ) ){
    129131                // check if wt-donate option doesn't exist
    130                 if( false === get_option('wt-donate' ) ) {
     132                if( false === get_site_option( 'wt-donate' ) ) {
    131133                    // then check for "Dismiss" GET request
    132134                    if( isset( $_GET['wt-donate'] ) ):
    133135                        // If GET request to hide notice exists, add option
    134136                        if( $_GET['wt-donate'] === 'true' ):
    135                             add_option('wt-donate', 'true');
     137                            add_site_option('wt-donate', 'true');
    136138                        endif;
    137139                    // If GET request doesn't exist, continue displaying notice
     
    200202         */
    201203        public function ai_suggestions_display(){
    202             $associator = get_option( 'wootomation-associator' );
     204            $associator = get_site_option( 'wootomation-associator' );
    203205
    204206            if( !$associator ) return false;
Note: See TracChangeset for help on using the changeset viewer.