Changeset 3447433
- Timestamp:
- 01/27/2026 12:31:54 AM (2 months ago)
- Location:
- bayarcash-wc/trunk
- Files:
-
- 4 edited
-
bayarcash-wc.php (modified) (1 diff)
-
includes/admin/js/blocks/checkout-fees.js (modified) (1 diff)
-
includes/src/blocks/class-checkout-fees-blocks-integration.php (modified) (1 diff)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
bayarcash-wc/trunk/bayarcash-wc.php
r3392430 r3447433 13 13 * Plugin Name: Bayarcash WC 14 14 * Plugin URI: https://bayarcash.com/ 15 * Version: 4.3.1 115 * Version: 4.3.12 16 16 * Description: Accept payment from Malaysia. Bayarcash support FPX, Direct Debit, DuitNow OBW & DuitNow QR payment channels. 17 17 * Author: Web Impian -
bayarcash-wc/trunk/includes/admin/js/blocks/checkout-fees.js
r3206084 r3447433 4 4 const { subscribe, select } = wp.data; 5 5 6 subscribe(function() { 7 const activePaymentMethod = select(PAYMENT_STORE_KEY).getActivePaymentMethod(); 6 let lastPaymentMethod = null; 7 let initialUpdateDone = false; 8 9 const updatePaymentMethod = (paymentMethod) => { 10 if (!paymentMethod) { 11 return; 12 } 8 13 extensionCartUpdate({ 9 14 namespace: "bayarcash-checkout-fees", 10 15 data: { 11 payment_method: activePaymentMethod16 payment_method: paymentMethod 12 17 } 13 18 }); 19 }; 20 21 subscribe(function() { 22 const activePaymentMethod = select(PAYMENT_STORE_KEY).getActivePaymentMethod(); 23 24 if (!activePaymentMethod) { 25 return; 26 } 27 28 if (activePaymentMethod !== lastPaymentMethod) { 29 lastPaymentMethod = activePaymentMethod; 30 updatePaymentMethod(activePaymentMethod); 31 initialUpdateDone = true; 32 } 14 33 }, PAYMENT_STORE_KEY); 34 35 // Force initial update after page load to ensure fee is calculated 36 document.addEventListener('DOMContentLoaded', function() { 37 setTimeout(function() { 38 if (!initialUpdateDone) { 39 const activePaymentMethod = select(PAYMENT_STORE_KEY).getActivePaymentMethod(); 40 if (activePaymentMethod) { 41 lastPaymentMethod = activePaymentMethod; 42 updatePaymentMethod(activePaymentMethod); 43 initialUpdateDone = true; 44 } 45 } 46 }, 500); 47 }); 15 48 })(); -
bayarcash-wc/trunk/includes/src/blocks/class-checkout-fees-blocks-integration.php
r3206084 r3447433 6 6 defined('ABSPATH') || exit; 7 7 8 define( 'BAYARCASH_BLOCK_VERSION', '1.0. 0' );8 define( 'BAYARCASH_BLOCK_VERSION', '1.0.2' ); 9 9 10 10 -
bayarcash-wc/trunk/readme.txt
r3392430 r3447433 5 5 Tested up to: 6.8 6 6 Requires PHP: 7.4 7 Stable tag: 4.3.1 17 Stable tag: 4.3.12 8 8 License: GPLv3 9 9 License URI: https://www.gnu.org/licenses/gpl-3.0.txt … … 89 89 == Changelog == 90 90 91 = 4.3.12 = 92 * Fixed checkout fee not applied on first page load for WooCommerce Blocks checkout 93 * Optimized payment method change detection to reduce unnecessary API calls 94 91 95 = 4.3.11 = 92 96 * Fixed minor bugs
Note: See TracChangeset
for help on using the changeset viewer.