Plugin Directory

Changeset 2997246


Ignore:
Timestamp:
11/16/2023 05:21:01 PM (2 years ago)
Author:
breadintegrations
Message:

fix AsLowAs in product pages when redirect-to-cart is enabled

Location:
bread-finance/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • bread-finance/trunk/README.md

    r2995512 r2997246  
    44Requires at least: 4.9
    55Tested up to: 6.1.1
    6 Stable tag: 3.4.1
     6Stable tag: 3.4.2
    77Requires PHP: 5.6
    88WC requires at least: 3.0
     
    7272
    7373== 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
    7478= 3.4.1
    75 * Current release
    7679* Compatiblity with WooCommerce Price Based on Country
    7780
  • bread-finance/trunk/assets/js/v2/main.js

    r2984693 r2997246  
    178178
    179179        let request = {
    180             action: 'admin_ajax_get_options',
     180            action: 'bread_get_options',
    181181            source: breadController.local.page_type,
    182182            configs: Object.values(configs)
     
    189189                        request, { response: response },
    190190                    );
    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');
    192192                    return;
    193193                }
     
    429429
    430430        $.post(breadController.local.ajaxurl, {
    431             action: 'admin_ajax_get_options',
     431            action: 'bread_get_options',
    432432            config: config,
    433433            source: 'product'
     
    454454                    return;
    455455                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');
    457457            }
    458458        }).fail(function(xhr, status) {
     
    465465        let self = breadController.breadCheckoutHandler,
    466466            config = this.config,
    467             request = this.getPostData('admin_ajax_get_options');
     467            request = this.getPostData('bread_get_options');
    468468
    469469        $.post(breadController.local.ajaxurl, request)
     
    491491                        request, { response: response },
    492492                    );
    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');
    494494                }
    495495            }).fail(function(xhr, status) {
     
    592592    };
    593593
    594     CartHandler.prototype.renderButton = function () {
     594    CartHandler.prototype.renderButton = function() {
    595595        let form = $('form.woocommerce-cart-form');
    596596        var self = breadController.breadCheckoutHandler,
    597597            config = this.config,
    598598            request = {
    599                 action: 'admin_ajax_get_options',
     599                action: 'bread_get_options',
    600600                source: 'cart_summary',
    601601                config: config,
     
    666666                        request, { response: response },
    667667                    );
    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');
    669669                }
    670670            })
     
    674674                    request, { status: status, xhr: xhr.responseText },
    675675                );
    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');
    677677            });
    678678    };
     
    792792        if (formIsValid) {
    793793            let data = {
    794                 action: 'admin_ajax_get_options',
     794                action: 'bread_get_options',
    795795                source: 'checkout'
    796796            };
     
    812812                            result: result
    813813                        };
    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');
    815815                    } else if (result.success) {
    816816                        breadOpts = Object.assign(result.data);
     
    821821                            result: result
    822822                        };
    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');
    824824                    }
    825825                },
     
    832832                        errorThrown: errorThrown
    833833                    };
    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');
    835835                }
    836836            });
  • bread-finance/trunk/bread-finance.php

    r2995512 r2997246  
    66 * Author: Bread Financial
    77 * Author URI: https://payments.breadfinancial.com/
    8  * Version: 3.4.1
     8 * Version: 3.4.2
    99 * Text Domain: bread_finance
    1010 * Domain Path: /i18n/languages/
     
    206206           
    207207            //Require minimums and constants
    208             define('WC_' . $tenant . '_VERSION', '3.4.1');
     208            define('WC_' . $tenant . '_VERSION', '3.4.2');
    209209            define('WC_' . $tenant . '_MIN_PHP_VER', '5.6.0');
    210210            define('WC_' . $tenant . '_MIN_WC_VER', '3.4.0');
  • bread-finance/trunk/classes/class-bread-finance-ajax.php

    r2995512 r2997246  
    5050        $ajax_events = array(
    5151            'bread_get_order_pay_opts' => true,
    52             'admin_ajax_get_options' => true,
     52            'bread_get_options' => true,
    5353            'bread_calculate_shipping' => true,
    5454            'bread_calculate_tax' => true,
     
    100100     * @return type
    101101     */
    102     public static function admin_ajax_get_options() {
     102    public static function bread_get_options() {
    103103
    104104        $bread_finance_plugin = Bread_Finance_Plugin::instance();
  • bread-finance/trunk/classes/class-bread-finance-gateway.php

    r2995512 r2997246  
    17681768
    17691769            // @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']) )) {
    17711771                return;
    17721772            }
     
    17861786           
    17871787            // @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']) )) {
    17891789                return $check;
    17901790            }
     
    20642064
    20652065                switch ($_POST['action']) {
    2066                     case 'admin_ajax_get_options':
     2066                    case 'bread_get_options':
    20672067                        wp_send_json_success($buttonHelper->get_bread_options());
    20682068                        break;
Note: See TracChangeset for help on using the changeset viewer.