Changeset 3320918
- Timestamp:
- 07/02/2025 03:51:12 AM (9 months ago)
- Location:
- blockonomics-bitcoin-payments/trunk
- Files:
-
- 3 edited
-
blockonomics-woocommerce.php (modified) (2 diffs)
-
php/Blockonomics.php (modified) (1 diff)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
blockonomics-bitcoin-payments/trunk/blockonomics-woocommerce.php
r3318213 r3320918 4 4 * Plugin URI: https://github.com/blockonomics/woocommerce-plugin 5 5 * Description: Accept Bitcoin Payments on your WooCommerce-powered website with Blockonomics 6 * Version: 3. 7.96 * Version: 3.8 7 7 * Author: Blockonomics 8 8 * Author URI: https://www.blockonomics.co … … 227 227 228 228 $discount = $cart->get_subtotal() * ( $discount_percent / 100 ); 229 $cart->add_fee( __( 'Payment Method Discount', 'blockonomics-bitcoin-payments' ), -$discount, false ); 230 } 231 229 if ( $discount > 0 ) { 230 $cart->add_fee( __( 'Payment Method Discount', 'blockonomics-bitcoin-payments' ), -$discount, false ); 231 } 232 } 233 232 234 233 235 /** -
blockonomics-bitcoin-payments/trunk/php/Blockonomics.php
r3318213 r3320918 533 533 $discount_percent = floatval( get_option( 'blockonomics_bitcoin_discount', 0 ) ); 534 534 $subtotal = (float) $wc_order->get_subtotal(); 535 $total = (float) $wc_order->get_total(); 535 536 536 537 // Calculate the expected amount after applying the Bitcoin discount 537 $expected_fiat = $ subtotal - ( $subtotal * ( $discount_percent / 100 ) );538 $expected_fiat = $total - ( $subtotal * ( $discount_percent / 100 ) ); 538 539 539 540 $order['expected_fiat'] = $expected_fiat - $paid_fiat; -
blockonomics-bitcoin-payments/trunk/readme.txt
r3318213 r3320918 4 4 Requires at least: 3.0.1 5 5 Tested up to: 6.8.1 6 Stable tag: 3. 7.96 Stable tag: 3.8 7 7 License: MIT 8 8 License URI: http://opensource.org/licenses/MIT … … 76 76 == Changelog == 77 77 78 = 3.8 = 79 * Fixed bugs with calculations due to discount setting 80 78 81 = 3.7.9 = 79 82 * Add discount settings for payment method
Note: See TracChangeset
for help on using the changeset viewer.