Skip to content

Commit

Permalink
5.7.4 minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
salvatore-disavio committed Sep 8, 2022
1 parent 47a2e9b commit 0f39063
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 10 deletions.
14 changes: 7 additions & 7 deletions src/assets/soisy_public.js
Original file line number Diff line number Diff line change
@@ -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');
Expand All @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions src/includes/class-settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
3 changes: 3 additions & 0 deletions src/readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
3 changes: 3 additions & 0 deletions src/readme.txte
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/soisy-woocommerce-plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
);
/*} );*/
Expand Down

0 comments on commit 0f39063

Please sign in to comment.