Plugin Directory

Changeset 3822858


Ignore:
Timestamp:
11/25/2026 12:45:54 PM (less than one hour ago)
Author:
aopy
Message:

Release 1.15.4

Location:
aopy-for-woocommerce
Files:
2 added
16 edited
1 copied

Legend:

Unmodified
Added
Removed
  • aopy-for-woocommerce/tags/1.15.4/cdm-woocommerce.php

    r3816522 r3822858  
    33 * Plugin Name: Aopy for WooCommerce
    44 * Description: Connects your WooCommerce store to Aopy (aopy.com) for email marketing, abandoned-cart recovery and automation. Adds a checkout newsletter opt-in and one-click cart-recovery links, and reports orders and refunds server-side. GDPR-aware via the WP Consent API.
    5  * Version: 1.15.3
     5 * Version: 1.15.4
    66 * Requires at least: 6.0
    77 * Requires PHP: 7.4
    … …  
    110110}
    111111
    112 define( 'AOPY_WOOCOMMERCE_VERSION', '1.15.3' );
     112define( 'AOPY_WOOCOMMERCE_VERSION', '1.15.4' );
    113113define( 'AOPY_WOOCOMMERCE_PLUGIN_FILE', __FILE__ );
    114114define( 'AOPY_WOOCOMMERCE_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
    … …  
    207207                require_once AOPY_WOOCOMMERCE_PLUGIN_DIR . 'includes/class-cdm-settings-text.php';
    208208                require_once AOPY_WOOCOMMERCE_PLUGIN_DIR . 'includes/class-cdm-settings-form.php';
     209                require_once AOPY_WOOCOMMERCE_PLUGIN_DIR . 'includes/class-cdm-auto-update.php';
    209210                require_once AOPY_WOOCOMMERCE_PLUGIN_DIR . 'includes/class-cdm-connect.php';
    210211                require_once AOPY_WOOCOMMERCE_PLUGIN_DIR . 'includes/class-cdm-retry.php';
  • aopy-for-woocommerce/tags/1.15.4/includes/class-cdm-commands-poller.php

    r3786120 r3822858  
    8989                        return;
    9090                }
    91                 $delay = self::handle_poll_response( Aopy_Api_Client::poll_commands() );
     91                self::$refresh_wanted = false;
     92                $delay                = self::handle_poll_response( Aopy_Api_Client::poll_commands() );
    9293                self::schedule_poll( $delay );
     94                // After the next poll is queued: the heartbeat's own ensure_scheduled() would
     95                // otherwise queue it first, at its own pace.
     96                if ( self::$refresh_wanted ) {
     97                        self::$refresh_wanted = false;
     98                        self::refresh_heartbeat();
     99                }
     100        }
     101
     102        /**
     103         * Set by a good answer that says `refresh: true` (a switch changed in Aopy).
     104         *
     105         * @var bool
     106         */
     107        private static $refresh_wanted = false;
     108
     109        /** Seconds between two heartbeats a poll answer asked for. */
     110        const REFRESH_MIN_GAP = 300;
     111
     112        /** Option holding the unix time of the last one. */
     113        const OPTION_REFRESH_AT = 'aopy_poll_refresh_at';
     114
     115        /**
     116         * Sends the heartbeat a poll answer asked for, at most once per 5 minutes.
     117         * The heartbeat answer is how the store learns Aopy's storefront switches.
     118         * Never throws: a lost refresh is only today's wait for the daily heartbeat.
     119         */
     120        private static function refresh_heartbeat() {
     121                try {
     122                        $last = (int) get_option( self::OPTION_REFRESH_AT, 0 );
     123                        if ( $last > 0 && time() - $last < self::REFRESH_MIN_GAP ) {
     124                                return;
     125                        }
     126                        // Stamped before the call, so a failing heartbeat is not retried every poll.
     127                        update_option( self::OPTION_REFRESH_AT, time(), false );
     128                        Aopy_Heartbeat::send();
     129                } catch ( Throwable $e ) {
     130                        return;
     131                }
    93132        }
    94133
    … …  
    127166                        Aopy_Commands_Runner::execute( $parsed['command'], self::server_now( $parsed ) );
    128167                }
    129                 $next = ( isset( $parsed['next_poll_s'] ) && is_int( $parsed['next_poll_s'] ) ) ? $parsed['next_poll_s'] : Aopy_Commands::IDLE_SECONDS;
     168                // Additive field (Aopy 2026-11-25): only the boolean true asks for a heartbeat.
     169                self::$refresh_wanted = isset( $parsed['refresh'] ) && true === $parsed['refresh'];
     170                $next                 = ( isset( $parsed['next_poll_s'] ) && is_int( $parsed['next_poll_s'] ) ) ? $parsed['next_poll_s'] : Aopy_Commands::IDLE_SECONDS;
    130171                $next = max( Aopy_Commands::MIN_POLL_SECONDS, min( Aopy_Commands::MAX_POLL_SECONDS, $next ) );
    131172                // Idle polls are spread a little so stores updated together do not all
  • aopy-for-woocommerce/tags/1.15.4/includes/class-cdm-settings-form.php

    r3814417 r3822858  
    3030                </form>
    3131                <?php Aopy_Settings_Parts::ad_share_row(); // R1-884: after the options form, so its off button is a form of its own. ?>
     32                <?php
     33                if ( class_exists( 'Aopy_Auto_Update' ) ) {
     34                        Aopy_Auto_Update::render_row(); // R3-2: the merchant's own switch; rendering writes nothing.
     35                }
     36                ?>
    3237                <?php
    3338        }
  • aopy-for-woocommerce/tags/1.15.4/includes/class-cdm-settings.php

    r3811695 r3822858  
    4545                add_action( 'admin_post_' . self::TEST_ACTION, array( __CLASS__, 'handle_test_event' ) );
    4646                add_action( 'admin_post_' . self::RESEND_ACTION, array( __CLASS__, 'handle_resend_rejected' ) );
     47                if ( class_exists( 'Aopy_Auto_Update' ) ) {
     48                        Aopy_Auto_Update::init(); // R3-2: the "Automatic updates" click, admin-post only.
     49                }
    4750        }
    4851
  • aopy-for-woocommerce/tags/1.15.4/languages/aopy-for-woocommerce-ro_RO.po

    r3797092 r3822858  
    452452msgstr "Aopy nu era disponibil. Retrimite peste câteva minute."
    453453
     454# Automatic updates row.
     455msgid "Automatic updates"
     456msgstr "Actualizări automate"
     457
     458msgid "WordPress installs new Aopy versions for you when they come out."
     459msgstr "WordPress instalează singur versiunile noi Aopy, când apar."
     460
     461msgid "Only users who can update plugins can change this."
     462msgstr "Doar utilizatorii care pot actualiza pluginuri pot schimba asta."
     463
     464msgid "Automatic plugin updates are turned off for this whole site."
     465msgstr "Actualizările automate ale pluginurilor sunt oprite pentru tot site-ul."
     466
     467msgid "Your site or host sets this, so it cannot be changed here."
     468msgstr "Setarea vine de la site sau de la gazdă, deci nu o poți schimba aici."
     469
     470msgid "Automatic updates are on."
     471msgstr "Actualizările automate sunt pornite."
     472
     473msgid "Automatic updates are off."
     474msgstr "Actualizările automate sunt oprite."
     475
     476msgid "Automatic updates cannot be changed here."
     477msgstr "Actualizările automate nu pot fi schimbate aici."
     478
     479msgid "Nothing was changed."
     480msgstr "Nu s-a schimbat nimic."
     481
     482msgid "On"
     483msgstr "Pornit"
     484
     485msgid "Off"
     486msgstr "Oprit"
     487
     488msgid "Turn on"
     489msgstr "Pornește"
     490
     491msgid "Turn off"
     492msgstr "Oprește"
     493
    454494# Obsolete: the msgid no longer exists in the code.
    455495#~ msgid "Reconnect to Aopy"
  • aopy-for-woocommerce/tags/1.15.4/readme.txt

    r3816522 r3822858  
    77WC requires at least: 8.0
    88WC tested up to: 11.2
    9 Stable tag: 1.15.3
     9Stable tag: 1.15.4
    1010License: GPLv2 or later
    1111License URI: https://www.gnu.org/licenses/gpl-2.0.html
    … …  
    119119== Changelog ==
    120120
     121= 1.15.4 =
     122* New: an "Automatic updates" row in the Aopy settings page turns automatic updates of this plugin on or off with one click.
     123* Fix: a switch you turn on in Aopy (theme price tracker, price drop alert, back in stock) now reaches your store within about 15 minutes instead of up to a day.
     124
    121125= 1.15.3 =
    122126* Privacy: the Aopy visitor cookie lasts at most 13 months (395 days) from the visitor's first visit, and the plugin sets it only for a visitor the Aopy script already counts.
  • aopy-for-woocommerce/tags/1.15.4/uninstall.php

    r3814417 r3822858  
    152152        'aopy_cmd_done',
    153153        'aopy_cmd_lock',
     154        // Last refresh heartbeat a poll answer asked for (class-cdm-commands-poller.php, 1.15.4).
     155        'aopy_poll_refresh_at',
    154156        // Catalogue push: Aopy's contract version, the pass in flight, its lock,
    155157        // the last complete pass and the next due time (class-cdm-catalogue.php).
  • aopy-for-woocommerce/trunk/cdm-woocommerce.php

    r3816522 r3822858  
    33 * Plugin Name: Aopy for WooCommerce
    44 * Description: Connects your WooCommerce store to Aopy (aopy.com) for email marketing, abandoned-cart recovery and automation. Adds a checkout newsletter opt-in and one-click cart-recovery links, and reports orders and refunds server-side. GDPR-aware via the WP Consent API.
    5  * Version: 1.15.3
     5 * Version: 1.15.4
    66 * Requires at least: 6.0
    77 * Requires PHP: 7.4
    … …  
    110110}
    111111
    112 define( 'AOPY_WOOCOMMERCE_VERSION', '1.15.3' );
     112define( 'AOPY_WOOCOMMERCE_VERSION', '1.15.4' );
    113113define( 'AOPY_WOOCOMMERCE_PLUGIN_FILE', __FILE__ );
    114114define( 'AOPY_WOOCOMMERCE_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
    … …  
    207207                require_once AOPY_WOOCOMMERCE_PLUGIN_DIR . 'includes/class-cdm-settings-text.php';
    208208                require_once AOPY_WOOCOMMERCE_PLUGIN_DIR . 'includes/class-cdm-settings-form.php';
     209                require_once AOPY_WOOCOMMERCE_PLUGIN_DIR . 'includes/class-cdm-auto-update.php';
    209210                require_once AOPY_WOOCOMMERCE_PLUGIN_DIR . 'includes/class-cdm-connect.php';
    210211                require_once AOPY_WOOCOMMERCE_PLUGIN_DIR . 'includes/class-cdm-retry.php';
  • aopy-for-woocommerce/trunk/includes/class-cdm-commands-poller.php

    r3786120 r3822858  
    8989                        return;
    9090                }
    91                 $delay = self::handle_poll_response( Aopy_Api_Client::poll_commands() );
     91                self::$refresh_wanted = false;
     92                $delay                = self::handle_poll_response( Aopy_Api_Client::poll_commands() );
    9293                self::schedule_poll( $delay );
     94                // After the next poll is queued: the heartbeat's own ensure_scheduled() would
     95                // otherwise queue it first, at its own pace.
     96                if ( self::$refresh_wanted ) {
     97                        self::$refresh_wanted = false;
     98                        self::refresh_heartbeat();
     99                }
     100        }
     101
     102        /**
     103         * Set by a good answer that says `refresh: true` (a switch changed in Aopy).
     104         *
     105         * @var bool
     106         */
     107        private static $refresh_wanted = false;
     108
     109        /** Seconds between two heartbeats a poll answer asked for. */
     110        const REFRESH_MIN_GAP = 300;
     111
     112        /** Option holding the unix time of the last one. */
     113        const OPTION_REFRESH_AT = 'aopy_poll_refresh_at';
     114
     115        /**
     116         * Sends the heartbeat a poll answer asked for, at most once per 5 minutes.
     117         * The heartbeat answer is how the store learns Aopy's storefront switches.
     118         * Never throws: a lost refresh is only today's wait for the daily heartbeat.
     119         */
     120        private static function refresh_heartbeat() {
     121                try {
     122                        $last = (int) get_option( self::OPTION_REFRESH_AT, 0 );
     123                        if ( $last > 0 && time() - $last < self::REFRESH_MIN_GAP ) {
     124                                return;
     125                        }
     126                        // Stamped before the call, so a failing heartbeat is not retried every poll.
     127                        update_option( self::OPTION_REFRESH_AT, time(), false );
     128                        Aopy_Heartbeat::send();
     129                } catch ( Throwable $e ) {
     130                        return;
     131                }
    93132        }
    94133
    … …  
    127166                        Aopy_Commands_Runner::execute( $parsed['command'], self::server_now( $parsed ) );
    128167                }
    129                 $next = ( isset( $parsed['next_poll_s'] ) && is_int( $parsed['next_poll_s'] ) ) ? $parsed['next_poll_s'] : Aopy_Commands::IDLE_SECONDS;
     168                // Additive field (Aopy 2026-11-25): only the boolean true asks for a heartbeat.
     169                self::$refresh_wanted = isset( $parsed['refresh'] ) && true === $parsed['refresh'];
     170                $next                 = ( isset( $parsed['next_poll_s'] ) && is_int( $parsed['next_poll_s'] ) ) ? $parsed['next_poll_s'] : Aopy_Commands::IDLE_SECONDS;
    130171                $next = max( Aopy_Commands::MIN_POLL_SECONDS, min( Aopy_Commands::MAX_POLL_SECONDS, $next ) );
    131172                // Idle polls are spread a little so stores updated together do not all
  • aopy-for-woocommerce/trunk/includes/class-cdm-settings-form.php

    r3814417 r3822858  
    3030                </form>
    3131                <?php Aopy_Settings_Parts::ad_share_row(); // R1-884: after the options form, so its off button is a form of its own. ?>
     32                <?php
     33                if ( class_exists( 'Aopy_Auto_Update' ) ) {
     34                        Aopy_Auto_Update::render_row(); // R3-2: the merchant's own switch; rendering writes nothing.
     35                }
     36                ?>
    3237                <?php
    3338        }
  • aopy-for-woocommerce/trunk/includes/class-cdm-settings.php

    r3811695 r3822858  
    4545                add_action( 'admin_post_' . self::TEST_ACTION, array( __CLASS__, 'handle_test_event' ) );
    4646                add_action( 'admin_post_' . self::RESEND_ACTION, array( __CLASS__, 'handle_resend_rejected' ) );
     47                if ( class_exists( 'Aopy_Auto_Update' ) ) {
     48                        Aopy_Auto_Update::init(); // R3-2: the "Automatic updates" click, admin-post only.
     49                }
    4750        }
    4851
  • aopy-for-woocommerce/trunk/languages/aopy-for-woocommerce-ro_RO.po

    r3797092 r3822858  
    452452msgstr "Aopy nu era disponibil. Retrimite peste câteva minute."
    453453
     454# Automatic updates row.
     455msgid "Automatic updates"
     456msgstr "Actualizări automate"
     457
     458msgid "WordPress installs new Aopy versions for you when they come out."
     459msgstr "WordPress instalează singur versiunile noi Aopy, când apar."
     460
     461msgid "Only users who can update plugins can change this."
     462msgstr "Doar utilizatorii care pot actualiza pluginuri pot schimba asta."
     463
     464msgid "Automatic plugin updates are turned off for this whole site."
     465msgstr "Actualizările automate ale pluginurilor sunt oprite pentru tot site-ul."
     466
     467msgid "Your site or host sets this, so it cannot be changed here."
     468msgstr "Setarea vine de la site sau de la gazdă, deci nu o poți schimba aici."
     469
     470msgid "Automatic updates are on."
     471msgstr "Actualizările automate sunt pornite."
     472
     473msgid "Automatic updates are off."
     474msgstr "Actualizările automate sunt oprite."
     475
     476msgid "Automatic updates cannot be changed here."
     477msgstr "Actualizările automate nu pot fi schimbate aici."
     478
     479msgid "Nothing was changed."
     480msgstr "Nu s-a schimbat nimic."
     481
     482msgid "On"
     483msgstr "Pornit"
     484
     485msgid "Off"
     486msgstr "Oprit"
     487
     488msgid "Turn on"
     489msgstr "Pornește"
     490
     491msgid "Turn off"
     492msgstr "Oprește"
     493
    454494# Obsolete: the msgid no longer exists in the code.
    455495#~ msgid "Reconnect to Aopy"
  • aopy-for-woocommerce/trunk/readme.txt

    r3816522 r3822858  
    77WC requires at least: 8.0
    88WC tested up to: 11.2
    9 Stable tag: 1.15.3
     9Stable tag: 1.15.4
    1010License: GPLv2 or later
    1111License URI: https://www.gnu.org/licenses/gpl-2.0.html
    … …  
    119119== Changelog ==
    120120
     121= 1.15.4 =
     122* New: an "Automatic updates" row in the Aopy settings page turns automatic updates of this plugin on or off with one click.
     123* Fix: a switch you turn on in Aopy (theme price tracker, price drop alert, back in stock) now reaches your store within about 15 minutes instead of up to a day.
     124
    121125= 1.15.3 =
    122126* Privacy: the Aopy visitor cookie lasts at most 13 months (395 days) from the visitor's first visit, and the plugin sets it only for a visitor the Aopy script already counts.
  • aopy-for-woocommerce/trunk/uninstall.php

    r3814417 r3822858  
    152152        'aopy_cmd_done',
    153153        'aopy_cmd_lock',
     154        // Last refresh heartbeat a poll answer asked for (class-cdm-commands-poller.php, 1.15.4).
     155        'aopy_poll_refresh_at',
    154156        // Catalogue push: Aopy's contract version, the pass in flight, its lock,
    155157        // the last complete pass and the next due time (class-cdm-catalogue.php).
Note: See TracChangeset for help on using the changeset viewer.