Skip to content

Commit

Permalink
Merge branch 'release/2.0.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
Damian Logghe committed Apr 25, 2017
2 parents 3ceac64 + d97df3d commit 339ec67
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 7 deletions.
7 changes: 6 additions & 1 deletion README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Donate link: https://geotargetingwp.com/
Tags: geotargeting, wordpress geotargeting, geolocation, geo target, geo targeting, ip geo detect
Requires at least: 3.6
Tested up to: 4.7.3
Stable tag: 2.0.1
Stable tag: 2.0.2
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Expand Down Expand Up @@ -38,6 +38,11 @@ More info and docs on ([https://geotargetingwp.com/docs/geotargeting-pro/](https

== Changelog ==

= 2.0.2 - Apr 25 =
* Fixed bug with cache mode on certain configurations
* Debug data not working on Ajax mode
* Make it clear that widget integration don't work in ajax mode

= 2.0.1 - Apr 19 =
* Different bugfixes, preparing release

Expand Down
2 changes: 1 addition & 1 deletion admin/partials/settings-page.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
<th><label for="widget_integration"><?php _e( 'Disable Widget Integration', $this->GeoTarget ); ?></label></th>
<td colspan="3">
<label><input type="checkbox" id="widget_integration" name="geot_settings[disable_widget_integration]" value="1" <?php checked($opts['disable_widget_integration'],'1');?>/>
<p class="help"><?php _e( 'Check this to remove geotargeting options from widgets', $this->GeoTarget ); ?></p>
<p class="help"><?php _e( 'Check this to remove geotargeting options from widgets. Important: Widget integration won\'t work with ajax mode turned on', $this->GeoTarget ); ?></p>
</td>
</tr>
<tr valign="top" class="">
Expand Down
4 changes: 2 additions & 2 deletions geotargeting-pro.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* Plugin Name: GeoTargeting Pro
* Plugin URI: http://wp.timersys.com/geotargeting/
* Description: Geo Targeting for WordPress will let you country-target your content based on users IP's and Geocountry Ip database
* Version: 2.0.1
* Version: 2.0.2
* Author: Timersys
* Author URI: http://wp.timersys.com/geotargeting/
* License: GPL-2.0+
Expand All @@ -31,7 +31,7 @@
}

define( 'GEOT_PLUGIN_FILE' , __FILE__);
define( 'GEOT_VERSION' , '2.0.1' );
define( 'GEOT_VERSION' , '2.0.2' );
define( 'GEOT_DB_VERSION' , '1.2' );
define( 'GEOT_PLUGIN_DIR' , plugin_dir_path(__FILE__) );
define( 'GEOT_PLUGIN_URL' , plugin_dir_url(__FILE__) );
Expand Down
4 changes: 2 additions & 2 deletions includes/class-geotarget.php
Original file line number Diff line number Diff line change
Expand Up @@ -268,15 +268,15 @@ private function define_admin_hooks() {
$geot_widgets = new Geot_Widgets( $this->get_GeoTarget(), $this->get_version() );

// give users a way to disable widgets targeting
if ( empty( $this->opts['disable_widget_integration'] ) && !defined( 'GEOT_WIDGETS' ) ) {
if ( empty( $this->opts['disable_widget_integration'] ) && empty( $this->opts['ajax_mode']) ) {
// add geot to all widgets
$this->loader->add_action( 'in_widget_form', $geot_widgets, 'add_geot_to_widgets', 5, 3 );
$this->loader->add_action( 'widget_display_callback', $geot_widgets, 'target_widgets' );
$this->loader->add_action( 'widget_update_callback', $geot_widgets, 'save_widgets_data', 5, 3 );
}
// License and Updates
$this->loader->add_action( 'admin_init' , $this->admin, 'handle_updates', 0 );
if( empty( $this->opts['license'] ) )
if( empty( $this->opts['license'] ) || empty( $this->opts['api_secret'] ) )
$this->loader->add_action( 'admin_notices' , $this->admin, 'license_missing_notice', 10 );
// Ajax admin
$this->loader->add_action( 'wp_ajax_geot_cities_by_country' , $this->admin, 'geot_cities_by_country' );
Expand Down
4 changes: 3 additions & 1 deletion public/class-geotarget-public.php
Original file line number Diff line number Diff line change
Expand Up @@ -381,10 +381,12 @@ public function check_if_geotargeted_content( $content ) {

/**
* Check if user is targeted for post and disable woo product
* On ajax mode this function will consume an extra credit to the user
* if cache mode is off
*/
public function disable_woo_product(){
global $post;
if( !isset( $post->ID ) )
if( ! class_exists( 'WooCommerce' ) || ! isset( $post->ID ) )
return;
$opts = get_post_meta( $post->ID, 'geot_options', true );

Expand Down

0 comments on commit 339ec67

Please sign in to comment.