diff --git a/src/assets/soisy_public.js b/src/assets/soisy_public.js index 6f01333..9ef9de9 100644 --- a/src/assets/soisy_public.js +++ b/src/assets/soisy_public.js @@ -1,5 +1,5 @@ window.addEventListener('DOMContentLoaded', (doc) => { - const wp = window.wp; + const soisypublic = window.soisypublic; const hasVariation = document.querySelector('form.variations_form.cart'); if (!!hasVariation) { const container=document.querySelector('.woocommerce-variation-add-to-cart'); @@ -15,15 +15,15 @@ window.addEventListener('DOMContentLoaded', (doc) => { }; const renderWidget = (container, amount) => { const actual = parseFloat(amount); - const min = parseFloat(wp.min_amount) > 100 ? parseFloat(wp.min_amount) : 100; - const max = parseFloat(wp.max_amount); + const min = parseFloat(soisypublic.min_amount) > 100 ? parseFloat(soisypublic.min_amount) : 100; + const max = parseFloat(soisypublic.max_amount); if (actual >= min && actual <= max) { let el = document.createElement('soisy-loan-quote'); - el.setAttribute('shop-id', wp.shop_id); + el.setAttribute('shop-id', soisypublic.shop_id); el.setAttribute('amount', amount); - el.setAttribute('instalments', wp.quote_instalments_amount); - if (!!wp.soisy_zero && wp.soisy_zero) { - el.setAttribute('zero-interest-rate', wp.soisy_zero); + el.setAttribute('instalments', soisypublic.quote_instalments_amount); + if (!!soisypublic.soisy_zero && soisypublic.soisy_zero) { + el.setAttribute('zero-interest-rate', soisypublic.soisy_zero); } container.prepend(el); diff --git a/src/includes/class-settings.php b/src/includes/class-settings.php index 408e0d3..2f0b321 100755 --- a/src/includes/class-settings.php +++ b/src/includes/class-settings.php @@ -91,12 +91,12 @@ static function adminSettingsForm() 'description' => __( 'Enable The Debug Logger', 'soisy' ), ], 'show_exclusions' =>[ - 'title' => __( 'Esclusione categorie', 'soisy' ), + 'title' => __( 'Exclude categories from Financing', 'soisy' ), 'type' => 'select', 'default' => 0, 'class' => 'select', 'options' => [], - 'description' => __( 'Seleziona le categorie che non potranno essere finanziabili', 'soisy' ), + 'description' => __( 'Select categories to be excluded from financing', 'soisy' ), ], 'reset_zero' => [ 'type' => 'hidden', diff --git a/src/readme.txt b/src/readme.txt index 7c6ccd5..97ebdca 100755 --- a/src/readme.txt +++ b/src/readme.txt @@ -36,6 +36,9 @@ Per maggiori info e vantaggi per gli e-commerce [visita il nostro sito](https:// == Changelog == += 5.7.4 = +* Minor fix. + = 5.7.0 = * Aggiunta la possibilità di escludere le categorie prodotto dal metodo di pagamento dilazionato. * Minor fix calcolo rata sui prodotti con variabili. diff --git a/src/readme.txte b/src/readme.txte index 7c6ccd5..97ebdca 100644 --- a/src/readme.txte +++ b/src/readme.txte @@ -36,6 +36,9 @@ Per maggiori info e vantaggi per gli e-commerce [visita il nostro sito](https:// == Changelog == += 5.7.4 = +* Minor fix. + = 5.7.0 = * Aggiunta la possibilità di escludere le categorie prodotto dal metodo di pagamento dilazionato. * Minor fix calcolo rata sui prodotti con variabili. diff --git a/src/soisy-woocommerce-plugin.php b/src/soisy-woocommerce-plugin.php index b1c70c5..e8030a4 100755 --- a/src/soisy-woocommerce-plugin.php +++ b/src/soisy-woocommerce-plugin.php @@ -689,7 +689,7 @@ function init_soisy_widget_for_cart_and_product_page() wp_enqueue_script( 'soisy-public', plugin_dir_url( __FILE__ ) . 'assets/soisy_public.js', [], time(), true ); wp_localize_script( 'soisy-public', - 'wp', + 'soisypublic', $vars ); /*} );*/