PluginProbe
PayPlug for WooCommerce (Official) / 3.1.0
PayPlug for WooCommerce (Official) v3.1.0
3.1.0 3.0.0 2.18.0 1.0.17 1.0.18 1.0.19 1.0.20 1.0.21 1.0.22 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.0.8 1.1.0 1.10.0 1.10.1 1.2.1 1.2.10 1.2.11 1.2.2 1.2.3 1.2.4 1.2.5 All 102 releases
← All changes | src/PayplugWoocommerceHelper.php +13 -35 3.0.0 → 3.1.0 View file →
@@ -579,26 +579,8 @@
579 579 }
580 580 }
581 581
582 582 /**
583 - * Get min and max for oney payment
584 - *
585 - * @return array
586 - */
587 - public static function get_min_max_oney()
588 - {
589 - $account = self::get_account_data_from_options();
590 - if (!$account) {
591 - return [];
592 - }
593 -
594 - return [
595 - 'min' => floatval($account['configuration']['oney']['min_amounts']['EUR']) / 100,
596 - 'max' => floatval($account['configuration']['oney']['max_amounts']['EUR']) / 100,
597 - ];
598 - }
599 -
600 - /**
601 583 * Check if oney is available with current settings
602 584 *
603 585 * @return bool
604 586 */
@@ -662,25 +644,8 @@
662 644
663 645 return load_textdomain($domain, $path . '/' . $mofile);
664 646 }
665 647
666 - /**
667 - * Check and update value for oney simulation
668 - *
669 - * @return void
670 - */
671 - public static function oney_simulation_values($keys_array, &$array): void
672 - {
673 - foreach ($keys_array as $key) {
674 - if (array_key_exists($key, $array)) {
675 - $array[$key]['down_payment_amount'] = floatval($array[$key]['down_payment_amount']) / 100;
676 - foreach ($array[$key]['installments'] as $k => $value) {
677 - $array[$key]['installments'][$k]['amount'] = floatval($value['amount']) / 100;
678 - }
679 - }
680 - }
681 - }
682 -
683 648 public static function getISOCountryCode()
684 649 {
685 650 preg_match('([a-z-]+)', get_locale(), $country);
686 651
@@ -786,8 +751,21 @@
786 751 */
787 752 public static function get_secure_domain(): string
788 753 {
789 754 return SECURE_DOMAIN;
755 + }
756 +
757 + /**
758 + * URL of the official Oney widget loader script. Depends on whether the connected
759 + * merchant account is QA or production, which is a build-time distinction (see
760 + * ONEY_LOADER_URL in payplug-config.php), not something this can derive from the
761 + * Test/Live mode toggle at runtime.
762 + *
763 + * @return string
764 + */
765 + public static function get_oney_loader_url(): string
766 + {
767 + return ONEY_LOADER_URL;
790 768 }
791 769
792 770 public static function payplug_logout(): void
793 771 {