Changeset 3336191
- Timestamp:
- 07/29/2025 07:00:56 PM (7 months ago)
- Location:
- autoship-cloud/trunk
- Files:
-
- 2 added
- 1 deleted
- 3 edited
-
app/Domain/PaymentIntegrations/AirwallexPaymentIntegration.php (added)
-
app/Domain/PaymentIntegrations/FunnelKitPaymentIntegration.php (added)
-
autoship.php (modified) (5 diffs)
-
js/schedule-options.js (modified) (18 diffs)
-
readme.txt (modified) (2 diffs)
-
src/upzelo.php (deleted)
Legend:
- Unmodified
- Added
- Removed
-
autoship-cloud/trunk/autoship.php
r3324496 r3336191 8 8 * Plugin URI: https://autoship.cloud 9 9 * Description: Autoship Cloud for WooCommerce 10 * Version: 2.9. 210 * Version: 2.9.3 11 11 * Author: Patterns In the Cloud LLC 12 12 * Author URI: https://qpilot.cloud … … 14 14 * Domain Path: /languages 15 15 * WC requires at least: 3.4.1 16 * WC tested up to: 9.8.517 */ 18 19 define( 'Autoship_Version', '2.9. 2' ); // phpcs:ignore Generic.NamingConventions.UpperCaseConstantName.ConstantNotUpperCase16 * WC tested up to: 10.0.4 17 */ 18 19 define( 'Autoship_Version', '2.9.3' ); // phpcs:ignore Generic.NamingConventions.UpperCaseConstantName.ConstantNotUpperCase 20 20 21 21 if ( ! defined( 'Autoship_Plugin_Dir' ) ) { 22 22 define( 'Autoship_Plugin_Dir', __DIR__ ); // phpcs:ignore Generic.NamingConventions.UpperCaseConstantName.ConstantNotUpperCase 23 23 } 24 24 25 if ( ! defined( 'Autoship_Plugin_File' ) ) { 25 26 define( 'Autoship_Plugin_File', __FILE__ ); // phpcs:ignore Generic.NamingConventions.UpperCaseConstantName.ConstantNotUpperCase 26 27 } 28 27 29 if ( ! defined( 'Autoship_Options_Count' ) ) { 28 30 define( 'Autoship_Options_Count', 5 ); // phpcs:ignore Generic.NamingConventions.UpperCaseConstantName.ConstantNotUpperCase 29 31 } 32 30 33 if ( ! defined( 'Autoship_Plugin_Folder_Name' ) ) { 31 34 define( 'Autoship_Plugin_Folder_Name', 'autoship-cloud' ); // phpcs:ignore Generic.NamingConventions.UpperCaseConstantName.ConstantNotUpperCase 32 35 } 36 33 37 if ( ! defined( 'Autoship_Plugin_Url' ) ) { 34 38 define( 'Autoship_Plugin_Url', plugin_dir_url( __FILE__ ) ); // phpcs:ignore Generic.NamingConventions.UpperCaseConstantName.ConstantNotUpperCase … … 55 59 */ 56 60 function autoship_activate() { 57 58 61 // Set the flush rewrite rules if not set. 59 62 if ( ! get_option( 'autoship_flush_rewrite_rules_flag' ) ) { … … 222 225 223 226 // While we allow Autoship to be active when requirements fail, no functionality is included. 224 if ( autoship_check_min_requirements() ) { 225 autoship_load_includes(); 226 autoship_load_languages(); 227 } 227 if ( ! autoship_check_min_requirements() ) { 228 return; 229 } 230 231 autoship_load_includes(); 232 autoship_load_languages(); 228 233 229 234 // Initialize the new architecture if autoloader exists. … … 252 257 253 258 add_action( 'plugins_loaded', 'autoship_init' ); 254 add_action( 'woocommerce_init', 'autoship_confirm_valid_payment_gateways', 99 ); 259 260 if ( function_exists( 'autoship_confirm_valid_payment_gateways' ) ) { 261 add_action( 'woocommerce_init', 'autoship_confirm_valid_payment_gateways', 99 ); 262 } 255 263 256 264 if ( AUTOSHIP_FEATURE_PRODUCT_SYNC_ENABLED ) { 257 // Register the hooks required for the product sync feature. 258 add_action( 'init', array( 'Autoship_Synchronizers_Products_Synchronizer', 'init' ) ); 259 260 register_deactivation_hook( __FILE__, array( 'Autoship_Synchronizers_Products_Synchronizer', 'disable_sync' ) ); 261 } 265 if ( class_exists( 'Autoship_Synchronizers_Products_Synchronizer' ) ) { 266 // Register the hooks required for the product sync feature. 267 add_action( 'init', array( 'Autoship_Synchronizers_Products_Synchronizer', 'init' ) ); 268 269 register_deactivation_hook( __FILE__, array( 'Autoship_Synchronizers_Products_Synchronizer', 'disable_sync' ) ); 270 } 271 } -
autoship-cloud/trunk/js/schedule-options.js
r3043329 r3336191 53 53 } else { 54 54 var $id = ( isSimpleProduct( $thisProduct ) ) ? 55 $thisProduct.find(window.autoshipTemplateData.optionsCls).attr( 'data-autoship-id' ) :56 $thisProduct.find(window.autoshipTemplateData.optionsCls).attr( 'data-autoship-variation-id' );55 $thisProduct.find(window.autoshipTemplateData.optionsCls).attr( 'data-autoship-id' ) : 56 $thisProduct.find(window.autoshipTemplateData.optionsCls).attr( 'data-autoship-variation-id' ); 57 57 } 58 58 … … 143 143 144 144 if ( window.autoshipProductData == undefined ) 145 window.autoshipProductData = [];145 window.autoshipProductData = []; 146 146 147 147 if ( window.autoshipProductData[id] == undefined ){ … … 152 152 153 153 if ( autoshipProductData == undefined ) 154 return false;154 return false; 155 155 156 156 if ( isSimpleProduct( $thisProduct ) ){ … … 178 178 179 179 if ( priceInfo != undefined ) 180 displayCustomPrice( $thisProduct, priceInfo.customized_price_enabled && !resetPrice ? priceInfo.autoship_price : priceInfo.original_price, priceInfo.original_price_selector );180 displayCustomPrice( $thisProduct, priceInfo.customized_price_enabled && !resetPrice ? priceInfo.autoship_price : priceInfo.original_price, priceInfo.original_price_selector ); 181 181 182 182 } … … 188 188 189 189 if ( $priceWrapper.length ) 190 $priceWrapper.html( $priceHTML );190 $priceWrapper.html( $priceHTML ); 191 191 192 192 } … … 196 196 197 197 if ( selectFrequency( $thisProduct, $autoshipOptions ) ) 198 $autoshipOptions.find(window.autoshipTemplateData.frequencyCls).addClass('active');198 $autoshipOptions.find(window.autoshipTemplateData.frequencyCls).addClass('active'); 199 199 200 200 }; … … 204 204 205 205 if ( show ) { 206 $autoshipOptions.find('.autoship-discount-label').show();207 $autoshipOptions.find('.autoship-no-discount-label').hide();206 $autoshipOptions.find('.autoship-discount-label').show(); 207 $autoshipOptions.find('.autoship-no-discount-label').hide(); 208 208 } else { 209 $autoshipOptions.find('.autoship-discount-label').hide();210 $autoshipOptions.find('.autoship-no-discount-label').show();209 $autoshipOptions.find('.autoship-discount-label').hide(); 210 $autoshipOptions.find('.autoship-no-discount-label').show(); 211 211 } 212 212 … … 235 235 236 236 if ( option == undefined ) 237 return false;237 return false; 238 238 239 239 $autoshipOptions.find(window.autoshipTemplateData.frequencyTypeValCls).val(option.frequency_type); … … 297 297 298 298 if ( autoshipData == undefined ) 299 return;299 return; 300 300 301 301 // Grab the selector for the price field. … … 372 372 373 373 if( ( '' == variationId ) || ( variationId == 0 ) ) 374 return; 374 { 375 376 return; 377 } 378 379 375 380 376 381 var $autoshipOptions = $( variationForm ).find(window.autoshipTemplateData.optionsCls); 377 382 var autoshipDataValues = autoshipData( variationId, variationForm ); 378 383 384 379 385 if ( autoshipDataValues ){ 380 381 386 initAutoshipData( variationForm, autoshipDataValues ); 382 387 setVariationId( variationForm, variationId ); … … 389 394 390 395 if ( 'yes' == autoshipDataValues.default_autoship_option ) 391 $autoshipYesRadio.prop('checked', true); 392 393 if ( $autoshipYesRadio.is(':checked') ) 394 $autoshipYesRadio.trigger('click'); 396 $autoshipYesRadio.prop('checked', true); 397 398 if ( $autoshipYesRadio.is(':checked') ){ 399 setTimeout(function(){ 400 $autoshipYesRadio.trigger('click'); 401 }, 1000); 402 403 } 395 404 396 405 } else { … … 399 408 } 400 409 410 hideDuplicatedPricesContainer(); 411 } 412 413 var hideDuplicatedPricesContainer = function(){ 414 if ($('.autoship-price-display').is(':visible') && $('.woocommerce-variation').is(':visible') && $('.woocommerce-variation .price').is(':visible')) 415 { 416 $('.autoship-price-display').hide(); 417 418 // If we are selecting the variation on the first time. Hide the autoship price display and set it as the price. It will be reseted on clicking One Time Purchase. 419 $('.woocommerce-variation .price').html($('.autoship-price-display').html()); 420 } 401 421 } 402 422 403 423 // Setup Event Handlers 404 424 var initEventHandlers = function( $autoshipOptions ){ 405 406 425 var selectToggle = function(e){ 407 426 … … 415 434 var selectDisplayChange = function(e){ 416 435 436 437 417 438 var $thisProduct = findProduct( e.target ), 418 439 $autoshipOptions = $thisProduct.find(window.autoshipTemplateData.optionsCls), … … 420 441 addClass = e.data.autoship ? 'autoship-active' : 'autoship-not-active'; 421 442 422 $thisProduct.removeClass( removeClass ).addClass( addClass ); 423 424 if ( e.data.autoship ){ selectDisplay( $thisProduct, $autoshipOptions ); } 425 else { selectHide( $thisProduct, $autoshipOptions ); } 426 427 togglePriceDisplay( $thisProduct, !e.data.autoship ); 428 $(document).trigger( 'autoship_option_change', [ $( this ), $thisProduct, $autoshipOptions ] ); 429 443 $thisProduct.removeClass( removeClass ).addClass( addClass ); 444 445 if ( e.data.autoship ){ selectDisplay( $thisProduct, $autoshipOptions ); } 446 else { selectHide( $thisProduct, $autoshipOptions ); } 447 448 togglePriceDisplay( $thisProduct, !e.data.autoship ); 449 $(document).trigger( 'autoship_option_change', [ $( this ), $thisProduct, $autoshipOptions ] ); 450 451 452 hideDuplicatedPricesContainer(); 453 454 if (!e.data.autoship) { 455 var variationForm = $(window.autoshipTemplateData.variationFormCls); 456 var variation = $(variationForm).data('autoship_woo_variation'); 457 458 if (variation !== undefined) { 459 $('.woocommerce-variation .price').html(variation.price_html); 460 } 461 } 462 else{ 463 var priceInfo = priceData[ retrieveProductId( $thisProduct ) ]; 464 if (priceInfo !== undefined) { 465 $('.woocommerce-variation .price').html(priceInfo.autoship_price); 466 } 467 } 430 468 } 431 469 … … 440 478 $('body').on( 'found_variation', window.autoshipTemplateData.variationFormCls, function ( e, variation ){ 441 479 triggerVariation( e.target, variation.variation_id ); 480 481 $(e.target).data('autoship_woo_variation', variation); 442 482 }); 483 443 484 444 485 } … … 461 502 462 503 if ( $autoshipOptions.hasClass('is-init') ) 463 return;504 return; 464 505 465 506 $autoshipOptions.addClass('is-init'); … … 473 514 474 515 if ( productId != undefined ) 475 var autoshipDatavalues = autoshipData( productId, $thisProduct );516 var autoshipDatavalues = autoshipData( productId, $thisProduct ); 476 517 477 518 if ( !autoshipDatavalues ) 478 return;519 return; 479 520 480 521 initAutoshipPriceData( $thisProduct, autoshipDatavalues ); … … 528 569 $(this).removeClass('open'); 529 570 $( 'body' ).removeClass('autoship-modal-open'); 530 }571 } 531 572 532 573 }); -
autoship-cloud/trunk/readme.txt
r3324496 r3336191 6 6 Tags: woocommerce subscriptions, subscribe and save, repeat delivery, subscription box, subscriptions 7 7 Requires at least: 4.6 8 Tested up to: 6.8. 18 Tested up to: 6.8.2 9 9 WC requires at least: 3.4.1 10 WC tested up to: 9.8.510 WC tested up to: 10.0.4 11 11 Requires PHP: 7.4 12 Stable tag: 2.9. 212 Stable tag: 2.9.3 13 13 License: GPLv2 or later 14 14 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 292 292 == Changelog == 293 293 294 = 2.9.3 - 2025-07-29 = 295 296 - Fixed: Resolved an issue with the Autoship discounted price displaying twice on some product pages. 297 298 - Fixed: Resolved a site wide critical error when upgrading to WooCommerce version 10 through a file upload. 299 300 - Fixed: Resolved an issue with prices reflecting incorrectly when switching between one-time purchases and Autoship on product pages. 301 294 302 = 2.9.2 - 2025-07-08 = 295 303 296 - New! [FunnelKit Payment Gateway for Stripe WooCommerce](https://wordpress.org/plugins/funnelkit-stripe-woo-payment-gateway/) is now a supported payment integration for Autoship Cloud. Merchants using the FunnelKit Payment Gateway for WooCommerce can now use Autoship with the FunnelKit integration to securely save payment methods during an Autoship Checkout and for processing Autoship Scheduled Orders.304 - New! [FunnelKit Payment Gateway for Stripe WooCommerce](https://wordpress.org/plugins/funnelkit-stripe-woo-payment-gateway/) is now a supported payment integration for Autoship Cloud. Merchants using the FunnelKit Payment Gateway for WooCommerce can now use Autoship with the FunnelKit integration to securely save payment methods during an Autoship Checkout and for processing Autoship Scheduled Orders. 297 305 298 306 = 2.9.1 - 2025-06-30 =
Note: See TracChangeset
for help on using the changeset viewer.