Changeset 2997246
- Timestamp:
- 11/16/2023 05:21:01 PM (2 years ago)
- Location:
- bread-finance/trunk
- Files:
-
- 5 edited
-
README.md (modified) (2 diffs)
-
assets/js/v2/main.js (modified) (13 diffs)
-
bread-finance.php (modified) (2 diffs)
-
classes/class-bread-finance-ajax.php (modified) (2 diffs)
-
classes/class-bread-finance-gateway.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
bread-finance/trunk/README.md
r2995512 r2997246 4 4 Requires at least: 4.9 5 5 Tested up to: 6.1.1 6 Stable tag: 3.4. 16 Stable tag: 3.4.2 7 7 Requires PHP: 5.6 8 8 WC requires at least: 3.0 … … 72 72 73 73 == Changelog == 74 = 3.4.2 75 * Current release 76 * Fix issue with placement not showing in PDP if "Redirect to the cart" is enabled 77 74 78 = 3.4.1 75 * Current release76 79 * Compatiblity with WooCommerce Price Based on Country 77 80 -
bread-finance/trunk/assets/js/v2/main.js
r2984693 r2997246 178 178 179 179 let request = { 180 action: ' admin_ajax_get_options',180 action: 'bread_get_options', 181 181 source: breadController.local.page_type, 182 182 configs: Object.values(configs) … … 189 189 request, { response: response }, 190 190 ); 191 document.logBreadIssue('error', errorInfo, '(Category) Error in admin_ajax_get_options response');191 document.logBreadIssue('error', errorInfo, '(Category) Error in bread_get_options response'); 192 192 return; 193 193 } … … 429 429 430 430 $.post(breadController.local.ajaxurl, { 431 action: ' admin_ajax_get_options',431 action: 'bread_get_options', 432 432 config: config, 433 433 source: 'product' … … 454 454 return; 455 455 let errorInfo = { response: response }; 456 document.logBreadIssue('error', errorInfo, '(PDP) Error in admin_ajax_get_options response');456 document.logBreadIssue('error', errorInfo, '(PDP) Error in bread_get_options response'); 457 457 } 458 458 }).fail(function(xhr, status) { … … 465 465 let self = breadController.breadCheckoutHandler, 466 466 config = this.config, 467 request = this.getPostData(' admin_ajax_get_options');467 request = this.getPostData('bread_get_options'); 468 468 469 469 $.post(breadController.local.ajaxurl, request) … … 491 491 request, { response: response }, 492 492 ); 493 document.logBreadIssue('error', errorInfo, '(PDP) Error in admin_ajax_get_options response');493 document.logBreadIssue('error', errorInfo, '(PDP) Error in bread_get_options response'); 494 494 } 495 495 }).fail(function(xhr, status) { … … 592 592 }; 593 593 594 CartHandler.prototype.renderButton = function () {594 CartHandler.prototype.renderButton = function() { 595 595 let form = $('form.woocommerce-cart-form'); 596 596 var self = breadController.breadCheckoutHandler, 597 597 config = this.config, 598 598 request = { 599 action: ' admin_ajax_get_options',599 action: 'bread_get_options', 600 600 source: 'cart_summary', 601 601 config: config, … … 666 666 request, { response: response }, 667 667 ); 668 document.logBreadIssue('error', errorInfo, '(Cart) Error in admin_ajax_get_options response');668 document.logBreadIssue('error', errorInfo, '(Cart) Error in bread_get_options response'); 669 669 } 670 670 }) … … 674 674 request, { status: status, xhr: xhr.responseText }, 675 675 ); 676 document.logBreadIssue('error', errorInfo, '(Cart) Error in admin_ajax_get_options call');676 document.logBreadIssue('error', errorInfo, '(Cart) Error in bread_get_options call'); 677 677 }); 678 678 }; … … 792 792 if (formIsValid) { 793 793 let data = { 794 action: ' admin_ajax_get_options',794 action: 'bread_get_options', 795 795 source: 'checkout' 796 796 }; … … 812 812 result: result 813 813 }; 814 document.logBreadIssue('error', errorInfo, '(Checkout) Error in admin_ajax_get_options result');814 document.logBreadIssue('error', errorInfo, '(Checkout) Error in bread_get_options result'); 815 815 } else if (result.success) { 816 816 breadOpts = Object.assign(result.data); … … 821 821 result: result 822 822 }; 823 document.logBreadIssue('error', errorInfo, '(Checkout) Error in admin_ajax_get_options result');823 document.logBreadIssue('error', errorInfo, '(Checkout) Error in bread_get_options result'); 824 824 } 825 825 }, … … 832 832 errorThrown: errorThrown 833 833 }; 834 document.logBreadIssue('error', errorInfo, '(Checkout) Error in admin_ajax_get_options call');834 document.logBreadIssue('error', errorInfo, '(Checkout) Error in bread_get_options call'); 835 835 } 836 836 }); -
bread-finance/trunk/bread-finance.php
r2995512 r2997246 6 6 * Author: Bread Financial 7 7 * Author URI: https://payments.breadfinancial.com/ 8 * Version: 3.4. 18 * Version: 3.4.2 9 9 * Text Domain: bread_finance 10 10 * Domain Path: /i18n/languages/ … … 206 206 207 207 //Require minimums and constants 208 define('WC_' . $tenant . '_VERSION', '3.4. 1');208 define('WC_' . $tenant . '_VERSION', '3.4.2'); 209 209 define('WC_' . $tenant . '_MIN_PHP_VER', '5.6.0'); 210 210 define('WC_' . $tenant . '_MIN_WC_VER', '3.4.0'); -
bread-finance/trunk/classes/class-bread-finance-ajax.php
r2995512 r2997246 50 50 $ajax_events = array( 51 51 'bread_get_order_pay_opts' => true, 52 ' admin_ajax_get_options' => true,52 'bread_get_options' => true, 53 53 'bread_calculate_shipping' => true, 54 54 'bread_calculate_tax' => true, … … 100 100 * @return type 101 101 */ 102 public static function admin_ajax_get_options() {102 public static function bread_get_options() { 103 103 104 104 $bread_finance_plugin = Bread_Finance_Plugin::instance(); -
bread-finance/trunk/classes/class-bread-finance-gateway.php
r2995512 r2997246 1768 1768 1769 1769 // @formatter:off 1770 if (!( array_key_exists('action', $_REQUEST) && in_array($_REQUEST['action'], [' admin_ajax_get_options', 'bread_calculate_tax', 'bread_calculate_shipping']) )) {1770 if (!( array_key_exists('action', $_REQUEST) && in_array($_REQUEST['action'], ['bread_get_options', 'bread_calculate_tax', 'bread_calculate_shipping']) )) { 1771 1771 return; 1772 1772 } … … 1786 1786 1787 1787 // @formatter:off 1788 if (!( array_key_exists('action', $_REQUEST) && in_array($_REQUEST['action'], [' admin_ajax_get_options', 'bread_calculate_tax', 'bread_calculate_shipping']) )) {1788 if (!( array_key_exists('action', $_REQUEST) && in_array($_REQUEST['action'], ['bread_get_options', 'bread_calculate_tax', 'bread_calculate_shipping']) )) { 1789 1789 return $check; 1790 1790 } … … 2064 2064 2065 2065 switch ($_POST['action']) { 2066 case ' admin_ajax_get_options':2066 case 'bread_get_options': 2067 2067 wp_send_json_success($buttonHelper->get_bread_options()); 2068 2068 break;
Note: See TracChangeset
for help on using the changeset viewer.