Plugin Directory

Changeset 976797


Ignore:
Timestamp:
09/02/2014 02:24:59 AM (12 years ago)
Author:
splashingpixels.com
Message:

added instance variable for instance targetting

Location:
woocommerce-geolocation-based-products/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • woocommerce-geolocation-based-products/trunk/includes/class-wc-geolocation-based-products-admin.php

    r958980 r976797  
    55
    66class WC_Geolocation_Based_Products_Admin {
     7    private static $_this;
     8
    79    /**
    810     * init
     
    1315     */
    1416    public function __construct() {
     17        self::$_this = $this;
     18       
    1519        add_action( 'admin_menu', array( $this, 'add_admin_menu' ) );
    1620
     
    2024
    2125        return true;
     26    }
     27
     28    /**
     29     * public access to instance object
     30     *
     31     * @since 1.1.1
     32     * @return bool
     33     */
     34    public function get_instance() {
     35        return self::$_this;
    2236    }
    2337
  • woocommerce-geolocation-based-products/trunk/includes/class-wc-geolocation-based-products-frontend.php

    r958980 r976797  
    55
    66class WC_Geolocation_Based_Products_Frontend {
     7    private static $_this;
    78
    89    var $location_data;
     
    1718     */
    1819    public function __construct() {
     20        self::$_this = $this;
    1921
    2022        add_action( 'pre_get_posts', array( $this, 'filter_query' ) );
     
    3032    }
    3133
     34    /**
     35     * public access to instance object
     36     *
     37     * @since 1.1.1
     38     * @return bool
     39     */
     40    public function get_instance() {
     41        return self::$_this;
     42    }
     43   
    3244    /**
    3345     * gets the user country
  • woocommerce-geolocation-based-products/trunk/readme.txt

    r974322 r976797  
    55Tested up to: 3.9.1
    66WooCommerce requires at least: 2.1.12
    7 Stable tag: 1.1.1
     7Stable tag: 1.1.2
    88License: GPLv3
    99License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    21213. Activate the plugin through the 'Plugins' menu in WordPress
    22224. Click on settings link to get to the settings page or get to the settings page by clicking on Geolocation link under WooCommerce Products Menu.
    23 
    24 == Usage ==
    2523
    2624You can add many different countries in which you want the settings to apply to.  You do this by adding a row and setting the 2 letter country code in which you want to apply to.  For example "US".  Then you set whether you want to hide certain product categories or just products themselves.  You may select more than one for each.
     
    4442== Changelog ==
    4543
     44= 1.1.2 | 9-02-2014 =
     45* Added - Instance variable for instance targetting
     46
    4647= 1.1.1 | 8-27-2014 =
    4748* Added - missing dependency files to check WC active
  • woocommerce-geolocation-based-products/trunk/woocommerce-geolocation-based-products.php

    r974318 r976797  
    44Plugin URI: http://splashingpixels.com/
    55Description: A WooCommerce plugin/extension that adds ability for your store to show/hide products based on visitors geolocation.
    6 Version: 1.1.1
    7 Author: SplashingPixels / Roy Ho
     6Version: 1.1.2
     7Author: Roy Ho
     8Author URI: http://royho.me
    89
    910Copyright: (c) 2014 Roy Ho
     
    2627 */
    2728class WC_Geolocation_Based_Products {
     29    private static $_this;
    2830
    2931    /**
     
    3537     */
    3638    public function __construct() {
    37        
     39        self::$_this = $this;
     40
    3841        add_action( 'init', array( $this, 'load_plugin_textdomain' ) );
    3942
     
    5659
    5760        return true;
     61    }
     62
     63    /**
     64     * public access to instance object
     65     *
     66     * @since 1.1.1
     67     * @return bool
     68     */
     69    public function get_instance() {
     70        return self::$_this;
    5871    }
    5972
Note: See TracChangeset for help on using the changeset viewer.