Plugin Directory

Changeset 3815994


Ignore:
Timestamp:
11/22/2026 12:56:23 AM (less than one hour ago)
Author:
creativemarketingltd
Message:

Add optional WooCommerce checkout consent and fix WordPress.org readme metadata in 1.2.0

Location:
autopostcode
Files:
11 added
2 edited

Legend:

Unmodified
Added
Removed
  • autopostcode/trunk/autopostcode.php

    r3576864 r3815994  
    66 * Author: AutoPostcode
    77 * Author URI: https://www.autopostcode.com/
    8  * Version: 1.2
     8 * Version: 1.2.0
    99 * Author: AutoPostcode
    1010 * License: GPL-2.0+
    … …  
    3333
    3434define('AUTOPOSTCODE_DEFAULT_ENDPOINT', 'https://autopostcode.com/api/public/lookup');
     35
     36require_once __DIR__ . '/google-ads-consent.php';
    3537
    3638function autopostcode_endpoint_needs_reset($endpoint) {
    … …  
    9294    register_setting('autopostcode', 'autopostcode_api_key');
    9395    register_setting('autopostcode', 'autopostcode_endpoint');
     96    register_setting('autopostcode', 'autopostcode_enable_google_ads_consent', array('sanitize_callback' => function ($value) { return $value === '1' ? '1' : '0'; }));
    9497});
    9598
    … …  
    119122                </tr>
    120123            </table>
     124            <h2 class="title"><?php esc_html_e('Google Ads Customer Match consent', 'autopostcode'); ?></h2>
     125            <p class="description"><?php esc_html_e('Publish a privacy policy that explains Google Ads customer matching and how to withdraw. The optional checkout checkbox starts unticked. WooCommerce order access can then verify the saved choice.', 'autopostcode'); ?></p>
     126            <?php if (!get_privacy_policy_url()) : ?>
     127                <p><?php esc_html_e('Set a WordPress privacy-policy page to show this option at checkout.', 'autopostcode'); ?></p>
     128            <?php endif; ?>
     129            <table class="form-table">
     130
     131                <tr>
     132                    <th scope="row"><?php esc_html_e('Checkout opt-in', 'autopostcode'); ?></th>
     133                    <td>
     134                        <label>
     135                            <input type="checkbox" name="autopostcode_enable_google_ads_consent" value="1" <?php checked(get_option('autopostcode_enable_google_ads_consent'), '1'); ?> />
     136                            <?php esc_html_e('Collect Google Ads consent at checkout, including guest orders.', 'autopostcode'); ?>
     137                        </label>
     138                    </td>
     139                </tr>
     140            </table>
    121141            <?php submit_button(); ?>
    122142        </form>
     143        <?php autopostcode_render_ads_withdrawal_settings(); ?>
    123144    </div>
    124145    <?php
  • autopostcode/trunk/readme.txt

    r3575452 r3815994  
    11=== AutoPostcode ===
    2 Contributors: AutoPostcode
    3 Tags: addresses, auto-complete, WC checkout, email address, postcode lookup, search postcode, postcode validation, woocommerce, checkout address autocomplete, Autopostcode address autocomplete, Autopostcode postcode lookup, woocommerce address autocomplete
    4 Stable tag: 1.2
     2Contributors: creativemarketingltd
     3Tags: postcode lookup, address autocomplete, woocommerce, checkout, UK addresses
     4Stable tag: 1.2.0
    55Tested up to: 7.0
    66Requires at least: 5.6
    … …  
    3434Our plugin is regularly updated to enhance the functionality, user experience and security features. The plugin can be automatically updated by enabling "Auto-Updates".
    3535
     36= Google Ads Customer Match consent =
     37Store administrators can enable an optional Google Ads consent checkbox in the AutoPostcode settings. It starts unticked and works for guest orders and registered customers. Checkout Blocks require WooCommerce 8.9 or later. The plugin stores the submitted choice in WordPress and exposes the current status to authorised WooCommerce order readers. Only an authorised user in the AutoPostcode application can send a Customer Match audience.
     38
    3639== Installation ==
    3740
    … …  
    5558== Changelog ==
    5659
     60= 1.2.0 =
     61* Add optional checkout consent for Google Ads Customer Match, guest order support and a withdrawal control.
     62
    5763= 1.0 2022-02-02 =
    5864* Introduce new address postcode lookup integration with woocommerce
Note: See TracChangeset for help on using the changeset viewer.