Changeset 3321046
- Timestamp:
- 07/02/2025 08:42:34 AM (9 months ago)
- Location:
- mlm-soft-integration/trunk
- Files:
-
- 4 edited
-
CHANGELOG.md (modified) (1 diff)
-
integrations/woocommerce/paymentGateways/eWallet/coupons/EWalletCouponFrontend.php (modified) (1 diff)
-
integrations/woocommerce/paymentGateways/eWallet/modules/EWalletCouponModule.php (modified) (1 diff)
-
mlm-soft-integration.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
mlm-soft-integration/trunk/CHANGELOG.md
r3308520 r3321046 2 2 3 3 ## Changelog ## 4 5 ## 2025-07-01 - version 3.9.5 6 * Updated `EWalletCouponFrontend` class. [EWalletCouponFrontend.php] 7 * Prevent coupon being removed from URL. See an issue [MLM-3112] [EWalletCouponModule.php] 4 8 5 9 ## 2025-06-08 - version 3.9.4 -
mlm-soft-integration/trunk/integrations/woocommerce/paymentGateways/eWallet/coupons/EWalletCouponFrontend.php
r3308520 r3321046 88 88 } 89 89 90 /** 91 * @since 3.9.5 92 */ 93 $removeElems = [ 94 '#major-publishing-actions', 95 '.edit-post-status', 96 '.edit-visibility', 97 '.edit-timestamp', 98 '#free_shipping', 99 '#minor-publishing>div:first-child' 100 ]; 101 if ( ! $this->hasUserManageCouponRole() ) { 102 $removeElems[] = '#usage_restriction_coupon_data'; 103 $removeElems[] = '#usage_limit_coupon_data'; 104 } 105 $removeElems = '"'.implode('","', $removeElems).'"'; 90 106 ?> 91 107 <script type='text/javascript'> 92 108 /* <![CDATA[ */ 93 109 if ('function' === typeof jQuery) { 94 let removeElems = [ '#major-publishing-actions', '.edit-post-status', '.edit-visibility', '.edit-timestamp', '#free_shipping'];110 let removeElems = [<?php echo $removeElems; ?>]; 95 111 removeElems.map((elem)=>{jQuery(elem).remove()}); 96 112 let disableElems = ['#title','#discount_type','#coupon_amount','#expiry_date']; -
mlm-soft-integration/trunk/integrations/woocommerce/paymentGateways/eWallet/modules/EWalletCouponModule.php
r3042880 r3321046 24 24 add_action('woocommerce_decrease_coupon_usage_count', [$this, 'decreaseCouponUsageCount']); 25 25 add_action(self::E_WALLET_COUPON_EXPIRED_ACTION, [$this, 'couponExpired'], 10, 1); 26 27 /** 28 * @since 3.9.5 29 */ 30 add_action('wp_loaded', array($this, 'checkActions' ), 5); 31 } 32 33 /** 34 * @since 3.9.5 35 */ 36 public function checkActions() 37 { 38 /** 39 * Prevent coupon being removed from URL. 40 * 41 * @see `update_cart_action` function in woocommerce\includes\class-wc-form-handler.php 42 */ 43 if ( isset( $_GET['remove_coupon'] ) ) { 44 $couponCode = sanitize_text_field($_GET['remove_coupon']); 45 if ( EWalletCoupon::isEWalletCoupon($couponCode) ) { 46 $redirect = wc_get_page_permalink('myaccount'); 47 wp_redirect($redirect); 48 exit(); 49 } 50 } 26 51 } 27 52 -
mlm-soft-integration/trunk/mlm-soft-integration.php
r3308520 r3321046 4 4 Plugin Name: MLM Soft Integration 5 5 Description: WP integration with mlm-soft.com cloud platform 6 Version: 3.9. 46 Version: 3.9.5 7 7 Author: MLM Soft Ltd. 8 8 Author URI: https://mlm-soft.com
Note: See TracChangeset
for help on using the changeset viewer.