Changeset 3390375
- Timestamp:
- 11/05/2025 11:33:59 AM (6 weeks ago)
- Location:
- gazchaps-woocommerce-getaddress-io
- Files:
-
- 12 added
- 2 edited
-
tags/3.2.4 (added)
-
tags/3.2.4/class.admin.php (added)
-
tags/3.2.4/class.api-client.php (added)
-
tags/3.2.4/class.checkout.php (added)
-
tags/3.2.4/class.common.php (added)
-
tags/3.2.4/class.database.php (added)
-
tags/3.2.4/class.exception.php (added)
-
tags/3.2.4/class.settings.php (added)
-
tags/3.2.4/gazchaps-getaddress-io-admin.min.js (added)
-
tags/3.2.4/gazchaps-getaddress-io.min.js (added)
-
tags/3.2.4/index.php (added)
-
tags/3.2.4/readme.txt (added)
-
trunk/index.php (modified) (7 diffs)
-
trunk/readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
gazchaps-woocommerce-getaddress-io/trunk/index.php
r3220344 r3390375 3 3 * Plugin Name: GazChap's WooCommerce getAddress.io Postcode Lookup 4 4 * Plugin URI: https://www.gazchap.com/posts/woocommerce-getaddress-io 5 * Version: 3.2. 35 * Version: 3.2.4 6 6 * Author: Gareth 'GazChap' Griffiths 7 7 * Author URI: https://www.gazchap.com 8 * Description: Adds a UK postcode address lookup tool to the WooCommerce checkout process.8 * Description: [Discontinued] Adds a UK postcode address lookup tool to the WooCommerce checkout process. 9 9 * Tested up to: 6.7.1 10 10 * WC requires at least: 3.0.0 11 * WC tested up to: 9.5.211 * WC tested up to: 10.3 12 12 * Text Domain: gazchaps-woocommerce-getaddress-io 13 13 * Domain Path: /lang … … 30 30 add_action( 'plugins_loaded', array( $this, 'load_class' ), 15 ); 31 31 add_action( 'plugins_loaded', array( $this, 'load_database' ), 20 ); 32 add_action( 'plugins_loaded', array( $this, 'set_disable_timer' ), 25 ); 32 33 33 34 add_action( 'admin_init', array( $this, 'init_plugin' ) ); … … 50 51 require GC_WC_GAIO_DIR . 'class.database.php'; 51 52 require GC_WC_GAIO_DIR . 'class.settings.php'; 52 require GC_WC_GAIO_DIR . 'class.checkout.php';53 53 54 if ( is_admin() ) { 55 require GC_WC_GAIO_DIR . 'class.admin.php'; 54 $cutoff = $this->get_disable_timer(); 55 if (!$cutoff || $cutoff > time()) { 56 require GC_WC_GAIO_DIR . 'class.checkout.php'; 57 58 if ( is_admin() ) { 59 require GC_WC_GAIO_DIR . 'class.admin.php'; 60 } 56 61 } 57 62 } … … 72 77 wp_schedule_event( time(), 'daily', 'gazchaps_get_address_io_dbpurge' ); 73 78 } 79 } 74 80 81 function get_disable_timer() { 82 $cutoff = get_option( 'gazchaps_getaddress_io_cutoff_date' ); 83 if (!$cutoff) return false; 84 85 $date = strtotime(date('Y-m-d', $cutoff)); 86 return $date; 87 } 88 89 function set_disable_timer() { 90 $timer = $this->get_disable_timer(); 91 if (!$timer) { 92 add_option( 'gazchaps_getaddress_io_cutoff_date', strtotime('+30 days'), '', true); 93 } 75 94 } 76 95 … … 88 107 deactivate_plugins( plugin_basename( __FILE__ ) ); 89 108 } 109 110 add_action( 'admin_notices', array( $this, 'plugin_deactivation_notice' ) ); 90 111 } 91 112 } … … 95 116 <div class="notice notice-error"><p><?php esc_html_e( 'GazChap\'s WooCommerce getAddress.io Postcode Lookup requires WooCommerce to be installed and activated.', 'gazchaps-woocommerce-getaddress-io' ) ?></p></div> 96 117 <?php 118 } 119 120 function plugin_deactivation_notice() { 121 $cutoff = $this->get_disable_timer(); 122 if (!$cutoff) return; 123 124 if ($cutoff >= time()): 125 ?> 126 <div class="notice notice-error"> 127 <p><strong><?php _e( 'ATTENTION: GazChap\'s WooCommerce getAddress.io Postcode Lookup -- Important Notice', 'gazchaps-woocommerce-getaddress-io' ) ?></strong></p> 128 <p><?php _e( 'This plugin is being discontinued due to <a href="https://blog.ideal-postcodes.co.uk/ideal-postcodes-wins-high-court-ruling" target="_blank">legal and ethical concerns over the data used by the getAddress.io API</a>. (link opens in new window)', 'gazchaps-woocommerce-getaddress-io' ) ?></p> 129 <p><?php _e( sprintf('The lookup system will work as normal until %s, after which point the lookup tools will no longer be available. Any queries regarding the discontinuation <a href="https://wordpress.org/support/plugin/gazchaps-woocommerce-getaddress-io/" target="_blank">can be directed to me at the WordPress.org Support Forum</a>, not getAddress.io (I have no connection to them!)', date('jS F, Y', $cutoff)), 'gazchaps-woocommerce-getaddress-io' ) ?></p> 130 <p><?php _e( 'Apologies for any inconvenience this may cause, and thank you for choosing my plugin!', 'gazchaps-woocommerce-getaddress-io' ) ?></p> 131 </div> 132 <?php 133 else: 134 ?> 135 <div class="notice notice-error"> 136 <p><strong><?php _e( 'ATTENTION: GazChap\'s WooCommerce getAddress.io Postcode Lookup -- Important Notice', 'gazchaps-woocommerce-getaddress-io' ) ?></strong></p> 137 <p><?php _e( 'This plugin is being discontinued due to <a href="https://blog.ideal-postcodes.co.uk/ideal-postcodes-wins-high-court-ruling" target="_blank">legal and ethical concerns over the data used by the getAddress.io API</a>, and the lookup facilities have now been disabled on your website. You should now deactivate and uninstall this plugin.', 'gazchaps-woocommerce-getaddress-io' ) ?></p> 138 <p><?php _e( 'Any queries regarding the discontinuation <a href="https://wordpress.org/support/plugin/gazchaps-woocommerce-getaddress-io/" target="_blank">can be directed to me at the WordPress.org Support Forum</a>, not getAddress.io (I have no connection to them!)', 'gazchaps-woocommerce-getaddress-io' ) ?></p> 139 <p><?php _e( 'Apologies for any inconvenience caused, and thank you for choosing my plugin!', 'gazchaps-woocommerce-getaddress-io' ) ?></p> 140 </div> 141 <?php 142 endif; 97 143 } 98 144 … … 105 151 return $links; 106 152 } 107 108 153 } 109 154 -
gazchaps-woocommerce-getaddress-io/trunk/readme.txt
r3359250 r3390375 5 5 Requires PHP: 5.6 6 6 Tested up to: 6.8.2 7 WC tested up to: 10. 17 WC tested up to: 10.3 8 8 License: GNU General Public License v2.0 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 12 12 13 13 Adds a UK postcode lookup tool into WooCommerce's checkout process. 14 15 == IMPORTANT NOTE == 16 With the update to v3.2.4, I have had to make the difficult decision to discontinue this plugin. 17 18 There are legal and ethical concerns regarding the source of the data used by the getAddress.io API, and consequently to protect myself and my users, I have little choice but to discontinue the plugin development. 19 20 After the plugin update (or a new installation) the plugin will remain active for 30 days and then the lookup facilities will no longer be available, at which point you should deactivate and uninstall the plugin. A notice will be displayed in the admin panel informing you of this, showing the date that your lookup will cease to function. 21 22 I am unable to field queries regarding possible alternative providers or plugins, but WooCommerce have recently added a native Address Lookup system into version 10.3 of WooCommerce which should rapidly become popular and gain the support of most postcode lookup services. 23 24 For more information: https://blog.ideal-postcodes.co.uk/ideal-postcodes-wins-high-court-ruling 14 25 15 26 == Description == … … 84 95 85 96 == Changelog == 97 = 3.2.4 (05/11/2025) = 98 99 * Added cutoff timer to disable lookup facilities in 30 days as a result of legal concerns surrounding getAddress.io and their API. 100 86 101 = 3.2.3 (10/10/2024) = 87 102
Note: See TracChangeset
for help on using the changeset viewer.