Plugin Directory

Changeset 3286209


Ignore:
Timestamp:
05/02/2025 12:21:01 PM (11 months ago)
Author:
monobank
Message:

Version 1.10.3

Location:
mono-checkout
Files:
3 edited
23 copied

Legend:

Unmodified
Added
Removed
  • mono-checkout/tags/1.10.3/includes/class.gateway.php

    r3255796 r3286209  
    404404        }
    405405        return strtoupper($prefix);
     406    }
     407
     408    public function getSelectedShippingOptions() {
     409        $option = $this->get_option('delivery_methods');
     410        if (empty($option)) {
     411            return array_keys($this->getShippingOptions());
     412        }
     413        if (!is_array($option)) {
     414            return [$option];
     415        }
     416        return $option;
     417    }
     418
     419    public function getSelectedPaymentMethods() {
     420        $option = $this->get_option('payment_methods');
     421        if (empty($option)) {
     422            return array_keys($this->getPaymentMethods());
     423        }
     424        if (!is_array($option)) {
     425            return [$option];
     426        }
     427        return $option;
    406428    }
    407429
     
    664686        }
    665687
    666         $delivery_methods = array_values(array_unique(array_merge($this->get_option('delivery_methods'), $individualShippingMethods)));
     688        $delivery_methods = array_values(array_unique(array_merge($this->getSelectedShippingOptions(), $individualShippingMethods)));
    667689        $free_delivery_from = $this->get_option('free_delivery_from');
    668         $payment_methods = array_values(array_unique(array_merge($this->get_option('payment_methods'), $individualPaymentMethods)));
     690        $payment_methods = array_values(array_unique(array_merge($this->getSelectedPaymentMethods(), $individualPaymentMethods)));
    669691        $payments_number = $this->get_option('payments_number');
    670692
  • mono-checkout/tags/1.10.3/mono.php

    r3275612 r3286209  
    77Plugin URI: https://checkout.mono.bank/woocomerce
    88Description: модуль Чекауту від monobank це спосіб автоматизувати процес оформлення покупки на вашому сайті. Доступний функціонал: предзаповнення даних отримувача, рекомендації по доставці та оплаті, всі доступні способи оплати від monobank: еквайринг, Покупка частинами та оплата при отриманні. Має бути підключений інтернет-еквайринг від monobank
    9 Version: 1.10.2
     9Version: 1.10.3
    1010Requires at least: 5.8
    1111Requires PHP: 7.4
     
    1919if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
    2020
    21 define( 'MONO_VERSION', '1.10.1' );
     21define( 'MONO_VERSION', '1.10.3' );
    2222define( 'MONO__MINIMUM_WP_VERSION', '5.8' );
    2323define( 'MONO__PLUGIN_FILE', __FILE__ );
  • mono-checkout/tags/1.10.3/readme.txt

    r3275612 r3286209  
    33Tags: mono, monobank, checkout, payment, woocommerce
    44Requires at least: 5.8
    5 Tested up to: 6.8
    6 Stable tag: 1.10.2
     5Tested up to: 6.8.1
     6Stable tag: 1.10.3
    77Requires PHP: 7.4
    88License: GPLv2 or later
     
    5454
    5555== Changelog ==
     56
     57= 1.10.3 =
     58* Виправлення помилок
    5659
    5760= 1.10.2 =
  • mono-checkout/trunk/includes/class.gateway.php

    r3255796 r3286209  
    404404        }
    405405        return strtoupper($prefix);
     406    }
     407
     408    public function getSelectedShippingOptions() {
     409        $option = $this->get_option('delivery_methods');
     410        if (empty($option)) {
     411            return array_keys($this->getShippingOptions());
     412        }
     413        if (!is_array($option)) {
     414            return [$option];
     415        }
     416        return $option;
     417    }
     418
     419    public function getSelectedPaymentMethods() {
     420        $option = $this->get_option('payment_methods');
     421        if (empty($option)) {
     422            return array_keys($this->getPaymentMethods());
     423        }
     424        if (!is_array($option)) {
     425            return [$option];
     426        }
     427        return $option;
    406428    }
    407429
     
    664686        }
    665687
    666         $delivery_methods = array_values(array_unique(array_merge($this->get_option('delivery_methods'), $individualShippingMethods)));
     688        $delivery_methods = array_values(array_unique(array_merge($this->getSelectedShippingOptions(), $individualShippingMethods)));
    667689        $free_delivery_from = $this->get_option('free_delivery_from');
    668         $payment_methods = array_values(array_unique(array_merge($this->get_option('payment_methods'), $individualPaymentMethods)));
     690        $payment_methods = array_values(array_unique(array_merge($this->getSelectedPaymentMethods(), $individualPaymentMethods)));
    669691        $payments_number = $this->get_option('payments_number');
    670692
  • mono-checkout/trunk/mono.php

    r3275612 r3286209  
    77Plugin URI: https://checkout.mono.bank/woocomerce
    88Description: модуль Чекауту від monobank це спосіб автоматизувати процес оформлення покупки на вашому сайті. Доступний функціонал: предзаповнення даних отримувача, рекомендації по доставці та оплаті, всі доступні способи оплати від monobank: еквайринг, Покупка частинами та оплата при отриманні. Має бути підключений інтернет-еквайринг від monobank
    9 Version: 1.10.2
     9Version: 1.10.3
    1010Requires at least: 5.8
    1111Requires PHP: 7.4
     
    1919if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
    2020
    21 define( 'MONO_VERSION', '1.10.1' );
     21define( 'MONO_VERSION', '1.10.3' );
    2222define( 'MONO__MINIMUM_WP_VERSION', '5.8' );
    2323define( 'MONO__PLUGIN_FILE', __FILE__ );
  • mono-checkout/trunk/readme.txt

    r3275612 r3286209  
    33Tags: mono, monobank, checkout, payment, woocommerce
    44Requires at least: 5.8
    5 Tested up to: 6.8
    6 Stable tag: 1.10.2
     5Tested up to: 6.8.1
     6Stable tag: 1.10.3
    77Requires PHP: 7.4
    88License: GPLv2 or later
     
    5454
    5555== Changelog ==
     56
     57= 1.10.3 =
     58* Виправлення помилок
    5659
    5760= 1.10.2 =
Note: See TracChangeset for help on using the changeset viewer.