Plugin Directory

Changeset 3390375


Ignore:
Timestamp:
11/05/2025 11:33:59 AM (6 weeks ago)
Author:
gazchap
Message:

3.2.4 update with cutoff timer

Location:
gazchaps-woocommerce-getaddress-io
Files:
12 added
2 edited

Legend:

Unmodified
Added
Removed
  • gazchaps-woocommerce-getaddress-io/trunk/index.php

    r3220344 r3390375  
    33 * Plugin Name: GazChap's WooCommerce getAddress.io Postcode Lookup
    44 * Plugin URI: https://www.gazchap.com/posts/woocommerce-getaddress-io
    5  * Version: 3.2.3
     5 * Version: 3.2.4
    66 * Author: Gareth 'GazChap' Griffiths
    77 * 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.
    99 * Tested up to: 6.7.1
    1010 * WC requires at least: 3.0.0
    11  * WC tested up to: 9.5.2
     11 * WC tested up to: 10.3
    1212 * Text Domain: gazchaps-woocommerce-getaddress-io
    1313 * Domain Path: /lang
     
    3030            add_action( 'plugins_loaded', array( $this, 'load_class' ), 15 );
    3131            add_action( 'plugins_loaded', array( $this, 'load_database' ), 20 );
     32            add_action( 'plugins_loaded', array( $this, 'set_disable_timer' ), 25 );
    3233
    3334            add_action( 'admin_init', array( $this, 'init_plugin' ) );
     
    5051            require GC_WC_GAIO_DIR . 'class.database.php';
    5152            require GC_WC_GAIO_DIR . 'class.settings.php';
    52             require GC_WC_GAIO_DIR . 'class.checkout.php';
    5353
    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                }
    5661            }
    5762        }
     
    7277                wp_schedule_event( time(), 'daily', 'gazchaps_get_address_io_dbpurge' );
    7378            }
     79        }
    7480
     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            }
    7594        }
    7695
     
    88107                    deactivate_plugins( plugin_basename( __FILE__ ) );
    89108                }
     109
     110                add_action( 'admin_notices', array( $this, 'plugin_deactivation_notice' ) );
    90111            }
    91112        }
     
    95116            <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>
    96117            <?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;
    97143        }
    98144
     
    105151            return $links;
    106152        }
    107 
    108153    }
    109154
  • gazchaps-woocommerce-getaddress-io/trunk/readme.txt

    r3359250 r3390375  
    55Requires PHP: 5.6
    66Tested up to: 6.8.2
    7 WC tested up to: 10.1
     7WC tested up to: 10.3
    88License: GNU General Public License v2.0
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    1212
    1313Adds a UK postcode lookup tool into WooCommerce's checkout process.
     14
     15== IMPORTANT NOTE ==
     16With the update to v3.2.4, I have had to make the difficult decision to discontinue this plugin.
     17
     18There 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
     20After 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
     22I 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
     24For more information: https://blog.ideal-postcodes.co.uk/ideal-postcodes-wins-high-court-ruling
    1425
    1526== Description ==
     
    8495
    8596== 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
    86101= 3.2.3 (10/10/2024) =
    87102
Note: See TracChangeset for help on using the changeset viewer.