Changeset 3822858
- Timestamp:
- 11/25/2026 12:45:54 PM (less than one hour ago)
- Location:
- aopy-for-woocommerce
- Files:
-
- 2 added
- 16 edited
- 1 copied
-
tags/1.15.4 (copied) (copied from aopy-for-woocommerce/trunk )
-
tags/1.15.4/cdm-woocommerce.php (modified) (3 diffs)
-
tags/1.15.4/includes/class-cdm-auto-update.php (added)
-
tags/1.15.4/includes/class-cdm-commands-poller.php (modified) (2 diffs)
-
tags/1.15.4/includes/class-cdm-settings-form.php (modified) (1 diff)
-
tags/1.15.4/includes/class-cdm-settings.php (modified) (1 diff)
-
tags/1.15.4/languages/aopy-for-woocommerce-ro_RO.mo (modified) ( previous)
-
tags/1.15.4/languages/aopy-for-woocommerce-ro_RO.po (modified) (1 diff)
-
tags/1.15.4/readme.txt (modified) (2 diffs)
-
tags/1.15.4/uninstall.php (modified) (1 diff)
-
trunk/cdm-woocommerce.php (modified) (3 diffs)
-
trunk/includes/class-cdm-auto-update.php (added)
-
trunk/includes/class-cdm-commands-poller.php (modified) (2 diffs)
-
trunk/includes/class-cdm-settings-form.php (modified) (1 diff)
-
trunk/includes/class-cdm-settings.php (modified) (1 diff)
-
trunk/languages/aopy-for-woocommerce-ro_RO.mo (modified) ( previous)
-
trunk/languages/aopy-for-woocommerce-ro_RO.po (modified) (1 diff)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/uninstall.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
aopy-for-woocommerce/tags/1.15.4/cdm-woocommerce.php
r3816522 r3822858 3 3 * Plugin Name: Aopy for WooCommerce 4 4 * 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. 35 * Version: 1.15.4 6 6 * Requires at least: 6.0 7 7 * Requires PHP: 7.4 … … 110 110 } 111 111 112 define( 'AOPY_WOOCOMMERCE_VERSION', '1.15. 3' );112 define( 'AOPY_WOOCOMMERCE_VERSION', '1.15.4' ); 113 113 define( 'AOPY_WOOCOMMERCE_PLUGIN_FILE', __FILE__ ); 114 114 define( 'AOPY_WOOCOMMERCE_PLUGIN_DIR', plugin_dir_path( __FILE__ ) ); … … 207 207 require_once AOPY_WOOCOMMERCE_PLUGIN_DIR . 'includes/class-cdm-settings-text.php'; 208 208 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'; 209 210 require_once AOPY_WOOCOMMERCE_PLUGIN_DIR . 'includes/class-cdm-connect.php'; 210 211 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 89 89 return; 90 90 } 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() ); 92 93 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 } 93 132 } 94 133 … … 127 166 Aopy_Commands_Runner::execute( $parsed['command'], self::server_now( $parsed ) ); 128 167 } 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; 130 171 $next = max( Aopy_Commands::MIN_POLL_SECONDS, min( Aopy_Commands::MAX_POLL_SECONDS, $next ) ); 131 172 // 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 30 30 </form> 31 31 <?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 ?> 32 37 <?php 33 38 } -
aopy-for-woocommerce/tags/1.15.4/includes/class-cdm-settings.php
r3811695 r3822858 45 45 add_action( 'admin_post_' . self::TEST_ACTION, array( __CLASS__, 'handle_test_event' ) ); 46 46 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 } 47 50 } 48 51 -
aopy-for-woocommerce/tags/1.15.4/languages/aopy-for-woocommerce-ro_RO.po
r3797092 r3822858 452 452 msgstr "Aopy nu era disponibil. Retrimite peste câteva minute." 453 453 454 # Automatic updates row. 455 msgid "Automatic updates" 456 msgstr "Actualizări automate" 457 458 msgid "WordPress installs new Aopy versions for you when they come out." 459 msgstr "WordPress instalează singur versiunile noi Aopy, când apar." 460 461 msgid "Only users who can update plugins can change this." 462 msgstr "Doar utilizatorii care pot actualiza pluginuri pot schimba asta." 463 464 msgid "Automatic plugin updates are turned off for this whole site." 465 msgstr "Actualizările automate ale pluginurilor sunt oprite pentru tot site-ul." 466 467 msgid "Your site or host sets this, so it cannot be changed here." 468 msgstr "Setarea vine de la site sau de la gazdă, deci nu o poți schimba aici." 469 470 msgid "Automatic updates are on." 471 msgstr "Actualizările automate sunt pornite." 472 473 msgid "Automatic updates are off." 474 msgstr "Actualizările automate sunt oprite." 475 476 msgid "Automatic updates cannot be changed here." 477 msgstr "Actualizările automate nu pot fi schimbate aici." 478 479 msgid "Nothing was changed." 480 msgstr "Nu s-a schimbat nimic." 481 482 msgid "On" 483 msgstr "Pornit" 484 485 msgid "Off" 486 msgstr "Oprit" 487 488 msgid "Turn on" 489 msgstr "Pornește" 490 491 msgid "Turn off" 492 msgstr "Oprește" 493 454 494 # Obsolete: the msgid no longer exists in the code. 455 495 #~ msgid "Reconnect to Aopy" -
aopy-for-woocommerce/tags/1.15.4/readme.txt
r3816522 r3822858 7 7 WC requires at least: 8.0 8 8 WC tested up to: 11.2 9 Stable tag: 1.15. 39 Stable tag: 1.15.4 10 10 License: GPLv2 or later 11 11 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 119 119 == Changelog == 120 120 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 121 125 = 1.15.3 = 122 126 * 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 152 152 'aopy_cmd_done', 153 153 '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', 154 156 // Catalogue push: Aopy's contract version, the pass in flight, its lock, 155 157 // the last complete pass and the next due time (class-cdm-catalogue.php). -
aopy-for-woocommerce/trunk/cdm-woocommerce.php
r3816522 r3822858 3 3 * Plugin Name: Aopy for WooCommerce 4 4 * 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. 35 * Version: 1.15.4 6 6 * Requires at least: 6.0 7 7 * Requires PHP: 7.4 … … 110 110 } 111 111 112 define( 'AOPY_WOOCOMMERCE_VERSION', '1.15. 3' );112 define( 'AOPY_WOOCOMMERCE_VERSION', '1.15.4' ); 113 113 define( 'AOPY_WOOCOMMERCE_PLUGIN_FILE', __FILE__ ); 114 114 define( 'AOPY_WOOCOMMERCE_PLUGIN_DIR', plugin_dir_path( __FILE__ ) ); … … 207 207 require_once AOPY_WOOCOMMERCE_PLUGIN_DIR . 'includes/class-cdm-settings-text.php'; 208 208 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'; 209 210 require_once AOPY_WOOCOMMERCE_PLUGIN_DIR . 'includes/class-cdm-connect.php'; 210 211 require_once AOPY_WOOCOMMERCE_PLUGIN_DIR . 'includes/class-cdm-retry.php'; -
aopy-for-woocommerce/trunk/includes/class-cdm-commands-poller.php
r3786120 r3822858 89 89 return; 90 90 } 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() ); 92 93 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 } 93 132 } 94 133 … … 127 166 Aopy_Commands_Runner::execute( $parsed['command'], self::server_now( $parsed ) ); 128 167 } 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; 130 171 $next = max( Aopy_Commands::MIN_POLL_SECONDS, min( Aopy_Commands::MAX_POLL_SECONDS, $next ) ); 131 172 // 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 30 30 </form> 31 31 <?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 ?> 32 37 <?php 33 38 } -
aopy-for-woocommerce/trunk/includes/class-cdm-settings.php
r3811695 r3822858 45 45 add_action( 'admin_post_' . self::TEST_ACTION, array( __CLASS__, 'handle_test_event' ) ); 46 46 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 } 47 50 } 48 51 -
aopy-for-woocommerce/trunk/languages/aopy-for-woocommerce-ro_RO.po
r3797092 r3822858 452 452 msgstr "Aopy nu era disponibil. Retrimite peste câteva minute." 453 453 454 # Automatic updates row. 455 msgid "Automatic updates" 456 msgstr "Actualizări automate" 457 458 msgid "WordPress installs new Aopy versions for you when they come out." 459 msgstr "WordPress instalează singur versiunile noi Aopy, când apar." 460 461 msgid "Only users who can update plugins can change this." 462 msgstr "Doar utilizatorii care pot actualiza pluginuri pot schimba asta." 463 464 msgid "Automatic plugin updates are turned off for this whole site." 465 msgstr "Actualizările automate ale pluginurilor sunt oprite pentru tot site-ul." 466 467 msgid "Your site or host sets this, so it cannot be changed here." 468 msgstr "Setarea vine de la site sau de la gazdă, deci nu o poți schimba aici." 469 470 msgid "Automatic updates are on." 471 msgstr "Actualizările automate sunt pornite." 472 473 msgid "Automatic updates are off." 474 msgstr "Actualizările automate sunt oprite." 475 476 msgid "Automatic updates cannot be changed here." 477 msgstr "Actualizările automate nu pot fi schimbate aici." 478 479 msgid "Nothing was changed." 480 msgstr "Nu s-a schimbat nimic." 481 482 msgid "On" 483 msgstr "Pornit" 484 485 msgid "Off" 486 msgstr "Oprit" 487 488 msgid "Turn on" 489 msgstr "Pornește" 490 491 msgid "Turn off" 492 msgstr "Oprește" 493 454 494 # Obsolete: the msgid no longer exists in the code. 455 495 #~ msgid "Reconnect to Aopy" -
aopy-for-woocommerce/trunk/readme.txt
r3816522 r3822858 7 7 WC requires at least: 8.0 8 8 WC tested up to: 11.2 9 Stable tag: 1.15. 39 Stable tag: 1.15.4 10 10 License: GPLv2 or later 11 11 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 119 119 == Changelog == 120 120 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 121 125 = 1.15.3 = 122 126 * 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 152 152 'aopy_cmd_done', 153 153 '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', 154 156 // Catalogue push: Aopy's contract version, the pass in flight, its lock, 155 157 // the last complete pass and the next due time (class-cdm-catalogue.php).
Note:
See TracChangeset
for help on using the changeset viewer.