Plugin Directory

Changeset 2974593


Ignore:
Timestamp:
10/04/2023 08:13:19 AM (2 years ago)
Author:
hsuvant
Message:

Fixed issues caused when Woocommerce Blocks was enabled

Location:
visma-pay-payment-gateway/trunk
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • visma-pay-payment-gateway/trunk/build/blocks.asset.php

    r2971864 r2974593  
    1 <?php return array('dependencies' => array('wp-element', 'wp-i18n'), 'version' => '1726f09322aefe4de4cd');
     1<?php return array('dependencies' => array('wp-element', 'wp-i18n'), 'version' => '2c580ae7eb866b0435e6');
  • visma-pay-payment-gateway/trunk/build/blocks.js

    r2971864 r2974593  
    1 !function(){"use strict";var e=window.wp.element,t=window.wp.i18n;const{registerPaymentMethod:n}=wc.wcBlocksRegistry,{getSetting:a}=wc.wcSettings,m=a("vismapay_data",{}),l=({embed:t,description:n,paymentDescription:a})=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)("p",null,n),t&&a&&(0,e.createElement)("p",null,a)),r=()=>(0,e.createElement)("div",{className:"woocommerce-error"},(0,e.createElement)("strong",null,(0,t.__)("No payment methods available for the currency: ","visma-pay-payment-gateway")+m.currency)),c=({index:t,method:n,selected:a,onSelect:m})=>{const l=`${n.group}-${t}`,r=n.selected_value;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{onClick:()=>m(l,r),className:a===l?"selected bank-button":"bank-button"},(0,e.createElement)("img",{alt:n.name,src:n.img_src})))},s=({groupName:t,methods:n,selected:a,onSelect:m})=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)("p",null,t),n.map(((t,n)=>(0,e.createElement)(c,{key:n,index:n,method:t,selected:a,onSelect:m}))),(0,e.createElement)("div",{style:{display:"block",clear:"both"}})),o=({methods:n,selected:a,onSelect:m})=>{const l=[{key:"banks",groupName:(0,t.__)("Internet banking","visma-pay-payment-gateway")},{key:"creditcards",groupName:(0,t.__)("Payment card","visma-pay-payment-gateway")},{key:"wallets",groupName:(0,t.__)("Wallet services","visma-pay-payment-gateway")},{key:"creditinvoices",groupName:(0,t.__)("Invoice or part payment","visma-pay-payment-gateway")}];return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{id:"visma-pay-bank-payments"},l.map((t=>{let l=n.filter((e=>e.group===t.key));return 0!==l.length&&(0,e.createElement)(s,{key:t.key,groupName:t.groupName,methods:l,selected:a,onSelect:m})}))))},i=t=>{const{eventRegistration:n,emitResponse:a,components:c}=t,{onPaymentSetup:s,onCheckoutFail:i}=n,{responseTypes:p}=a,{LoadingMask:y}=c,[d,u]=(0,e.useState)(null),[g,E]=(0,e.useState)(!1),[v,h]=(0,e.useState)(!1);return(0,e.useEffect)((()=>{const e=s((async()=>(h(!0),{type:p.SUCCESS,meta:{paymentMethodData:{payment_method:"visma_pay",visma_pay_selected_bank:g}}})));return()=>{e()}}),[p.SUCCESS,s,g]),(0,e.useEffect)((()=>{const e=i((()=>(h(!1),!0)));return()=>{e()}}),[i]),(0,e.createElement)(y,{isLoading:v,showSpinner:!0},(0,e.createElement)(l,{embed:m.embed,description:m.description,paymentDescription:m.paymentDescription}),m.embed&&m.paymentMethods&&m.paymentMethods.length>0?(0,e.createElement)(o,{methods:m.paymentMethods,selected:d,onSelect:(e,t)=>{u(e),E(t)}}):(0,e.createElement)(r,null))};n({name:"visma_pay",label:(0,e.createElement)((t=>{const{PaymentMethodLabel:n}=t.components;return(0,e.createElement)(n,{text:m.title})}),null),ariaLabel:m.title,content:(0,e.createElement)(i,null),edit:(0,e.createElement)(i,null),canMakePayment:()=>!0,paymentMethodId:"visma_pay"})}();
     1!function(){"use strict";var e=window.wp.element,t=window.wp.i18n;const{registerPaymentMethod:a}=wc.wcBlocksRegistry,{getSetting:n}=wc.wcSettings,m=n("vismapay_data",{}),l=({embed:t,description:a,paymentDescription:n})=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)("p",null,a),t&&n&&(0,e.createElement)("p",null,n)),r=()=>(0,e.createElement)("div",{className:"woocommerce-error"},(0,e.createElement)("strong",null,(0,t.__)("No payment methods available for the currency: ","visma-pay-payment-gateway")+m.currency)),c=({index:t,method:a,selected:n,onSelect:m})=>{const l=`${a.group}-${t}`,r=a.selected_value;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{onClick:()=>m(l,r),className:n===l?"selected bank-button":"bank-button"},(0,e.createElement)("img",{alt:a.name,src:a.img_src})))},s=({groupName:t,methods:a,selected:n,onSelect:m})=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)("p",null,t),a.map(((t,a)=>(0,e.createElement)(c,{key:a,index:a,method:t,selected:n,onSelect:m}))),(0,e.createElement)("div",{style:{display:"block",clear:"both"}})),o=({methods:a,selected:n,onSelect:m})=>{const l=[{key:"banks",groupName:(0,t.__)("Internet banking","visma-pay-payment-gateway")},{key:"creditcards",groupName:(0,t.__)("Payment card","visma-pay-payment-gateway")},{key:"wallets",groupName:(0,t.__)("Wallet services","visma-pay-payment-gateway")},{key:"creditinvoices",groupName:(0,t.__)("Invoice or part payment","visma-pay-payment-gateway")}];return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{id:"visma-pay-bank-payments"},l.map((t=>{let l=a.filter((e=>e.group===t.key));return 0!==l.length&&(0,e.createElement)(s,{key:t.key,groupName:t.groupName,methods:l,selected:n,onSelect:m})}))))},i=t=>{const{eventRegistration:a,emitResponse:n,components:c}=t,{onPaymentSetup:s,onCheckoutFail:i}=a,{responseTypes:p}=n,{LoadingMask:y}=c,[d,u]=(0,e.useState)(null),[g,E]=(0,e.useState)(!1),[v,h]=(0,e.useState)(!1);return(0,e.useEffect)((()=>{const e=s((async()=>(h(!0),{type:p.SUCCESS,meta:{paymentMethodData:{payment_method:"visma_pay",visma_pay_selected_bank:g}}})));return()=>{e()}}),[p.SUCCESS,s,g]),(0,e.useEffect)((()=>{const e=i((()=>(h(!1),!0)));return()=>{e()}}),[i]),(0,e.createElement)(y,{isLoading:v,showSpinner:!0},(0,e.createElement)(l,{embed:m.embed,description:m.description,paymentDescription:m.paymentDescription}),m.embed&&m.paymentMethods&&m.paymentMethods.length>0?(0,e.createElement)(o,{methods:m.paymentMethods,selected:d,onSelect:(e,t)=>{u(e),E(t)}}):(0,e.createElement)(r,null))};a({name:"visma_pay",label:(0,e.createElement)((t=>{const{PaymentMethodLabel:a}=t.components;return(0,e.createElement)(a,{text:m.title})}),null),ariaLabel:m.title,content:(0,e.createElement)(i,null),edit:(0,e.createElement)(i,null),canMakePayment:()=>!0,paymentMethodId:"visma_pay",supports:{features:m.supports}})}();
  • visma-pay-payment-gateway/trunk/includes/blocks/visma_pay_blocks_support.php

    r2971864 r2974593  
    1111    {
    1212        $this->settings = get_option('woocommerce_visma_pay_settings', []);
    13         $this->gateway = new WC_Gateway_Visma_Pay();
     13        $payment_gateways_class = WC()->payment_gateways();
     14        $payment_gateways = $payment_gateways_class->payment_gateways();
     15        $this->gateway = $payment_gateways['visma_pay'];
    1416    }
    1517
  • visma-pay-payment-gateway/trunk/includes/lib/Visma/VismaPay.php

    r2971845 r2974593  
    6767            $payment_data['plugin_info'] .= '0';
    6868
    69         $payment_data['plugin_info'] .= '|1.1.0';
     69        $payment_data['plugin_info'] .= '|1.1.2';
    7070
    7171        return $this->makeRequest($url, $payment_data);
  • visma-pay-payment-gateway/trunk/languages/visma-pay-payment-gateway-fi-0a194271922d454324b7e88e0bfed673.json

    r2971864 r2974593  
    1 {"translation-revision-date":"2023-09-14 15:55+0300","generator":"WP-CLI\/2.8.1","source":"build\/blocks.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"fi","plural-forms":"nplurals=2; plural=n != 1;"},"No payment methods available for the currency: ":["Ei tuettuja maksutapoja valuutalle:"],"Internet banking":["Verkkopankkimaksu"],"Payment card":["Korttimaksu"],"Wallet services":["Lompakkopalvelut"],"Invoice or part payment":["Lasku tai osamaksu"]}}}
     1{"translation-revision-date":"2023-09-27 10:29+0300","generator":"WP-CLI\/2.8.1","source":"build\/blocks.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"fi","plural-forms":"nplurals=2; plural=n != 1;"},"No payment methods available for the currency: ":["Ei tuettuja maksutapoja valuutalle:"],"Internet banking":["Verkkopankkimaksu"],"Payment card":["Korttimaksu"],"Wallet services":["Lompakkopalvelut"],"Invoice or part payment":["Lasku tai osamaksu"]}}}
  • visma-pay-payment-gateway/trunk/languages/visma-pay-payment-gateway-fi.po

    r2971845 r2974593  
    44"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/visma-pay-payment-"
    55"gateway\n"
    6 "POT-Creation-Date: 2023-09-21T13:11:01+00:00\n"
    7 "PO-Revision-Date: 2023-09-21 16:11+0300\n"
     6"POT-Creation-Date: 2023-10-03T13:10:45+00:00\n"
     7"PO-Revision-Date: 2023-10-03 16:12+0300\n"
    88"Last-Translator: \n"
    99"Language-Team: Suomi\n"
     
    1313"Content-Transfer-Encoding: 8bit\n"
    1414"Plural-Forms: nplurals=2; plural=n != 1;\n"
    15 "X-Generator: Poedit 3.3.2\n"
     15"X-Generator: Poedit 3.4\n"
    1616"X-Loco-Version: 2.5.2; wp-5.8\n"
    1717
  • visma-pay-payment-gateway/trunk/languages/visma-pay-payment-gateway.pot

    r2971845 r2974593  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: Visma Pay Payment Gateway 1.1.0\n"
     5"Project-Id-Version: Visma Pay Payment Gateway 1.1.2\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/visma-pay-payment-gateway\n"
    77"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
     
    1010"Content-Type: text/plain; charset=UTF-8\n"
    1111"Content-Transfer-Encoding: 8bit\n"
    12 "POT-Creation-Date: 2023-09-21T13:11:01+00:00\n"
     12"POT-Creation-Date: 2023-10-03T13:10:45+00:00\n"
    1313"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    1414"X-Generator: WP-CLI 2.8.1\n"
  • visma-pay-payment-gateway/trunk/readme.txt

    r2971845 r2974593  
    4040== Changelog ==
    4141
     42= 1.1.2 =
     43* Fixed issues caused when Woocommerce Blocks was enabled
     44
     45= 1.1.1 =
     46* Added files that were missing from 1.1.0
     47
    4248= 1.1.0 =
    4349* Support for Woocommerce Blocks
     
    4551
    4652= 1.0.9 =
    47 * Support for HSOP
     53* Support for HPOS
    4854* Updated order of payment methods
    4955* Updated 'tested up to' versions.
  • visma-pay-payment-gateway/trunk/visma-pay-payment-gateway.php

    r2971891 r2974593  
    44 * Plugin URI: https://www.vismapay.com/docs
    55 * Description: Visma Pay Payment Gateway Integration for Woocommerce
    6  * Version: 1.1.1
     6 * Version: 1.1.2
    77 * Author: Visma
    88 * Author URI: https://www.visma.fi/vismapay/
Note: See TracChangeset for help on using the changeset viewer.