From 42f9ef2e994bb337df82c0a32cb59ac40db1f1ae Mon Sep 17 00:00:00 2001 From: Drew Rowan Date: Tue, 23 Apr 2024 09:11:05 +0200 Subject: [PATCH] Release 3.0.2 --- README.md | 4 ++-- build/index.asset.php | 1 + build/index.css | 1 + build/index.js | 1 + docs/en/documentation.html | 4 ++-- .../class-wc-postfinancecheckout-admin-settings-page.php | 2 +- includes/class-wc-postfinancecheckout-migration.php | 2 +- readme.txt | 2 +- 8 files changed, 10 insertions(+), 7 deletions(-) create mode 100644 build/index.asset.php create mode 100644 build/index.css create mode 100644 build/index.js diff --git a/README.md b/README.md index f6b267d..ac59dc5 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ This repository contains the PostFinance Checkout plugin that enables WooCommerc ## Documentation -* [Documentation](https://plugin-documentation.postfinance-checkout.ch/pfpayments/woocommerce/3.0.1/docs/en/documentation.html) +* [Documentation](https://plugin-documentation.postfinance-checkout.ch/pfpayments/woocommerce/3.0.2/docs/en/documentation.html) ## Support @@ -33,4 +33,4 @@ ____________________________________________________________________________ ## License -Please see the [license file](https://github.com/pfpayments/woocommerce/blob/3.0.1/LICENSE) for more information. \ No newline at end of file +Please see the [license file](https://github.com/pfpayments/woocommerce/blob/3.0.2/LICENSE) for more information. \ No newline at end of file diff --git a/build/index.asset.php b/build/index.asset.php new file mode 100644 index 0000000..b8b5579 --- /dev/null +++ b/build/index.asset.php @@ -0,0 +1 @@ + array('@woocommerce/blocks-registry', 'react', 'wp-element', 'wp-polyfill'), 'version' => 'b53687c38b284a0c8c13'); diff --git a/build/index.css b/build/index.css new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/build/index.css @@ -0,0 +1 @@ + diff --git a/build/index.js b/build/index.js new file mode 100644 index 0000000..8552c0d --- /dev/null +++ b/build/index.js @@ -0,0 +1 @@ +!function(){"use strict";var e=window.wp.element,n=window.React,o=function({paymentMethodConfigurationId:o,eventRegistration:t}){const{onCheckoutSuccess:i,onCheckoutFail:a,onCheckoutValidation:c,onPaymentProcessing:r,onPaymentSetup:s}=t,[l,u]=(0,n.useState)(!0),d=`payment-method-${o}`;let m=window.IframeCheckoutHandler(o);const g=(0,n.useCallback)((()=>{m.create(d),u(!1)}),[o,d]);return(0,n.useEffect)((()=>{document.getElementById(d)&&g();const e=i((()=>(console.log("onCheckoutSuccess"),new Promise((e=>{console.log("Running submit"),m.submit(),setTimeout((function(){e(!1)}),3e4)}))))),n=c((()=>{console.log("onCheckoutValidation");let e=new Promise((e=>{m.setValidationCallback((n=>{console.log("Validation was ",n),void 0!==n.success?e(n.success):(console.error("Validation result did not return a success status."),e(!1))}))}));return m.validate(),e})),o=a((()=>{console.log("onCheckoutFail")})),t=r((()=>{console.log("onPaymentProcessing")})),l=s((()=>{console.log("onPaymentSetup")}));return()=>{e(),o(),n(),t(),l()}}),[g,d,i,a,c,r,s]),(0,e.createElement)("div",null,l&&(0,e.createElement)("div",null,"Loading payment method..."),(0,e.createElement)("div",{id:d}))},t=function({paymentMethodConfigurationId:e,eventRegistration:o}){console.log("LightboxComponent");const{onCheckoutSuccess:t,onCheckoutValidationBeforeProcessing:i,onCheckoutError:a}=o,[c,r]=(0,n.useState)(!0);(0,n.useEffect)((()=>{const n=t((()=>new Promise(((n,o)=>{console.log("onCheckoutSuccess"),window.LightboxCheckoutHandler.startPayment(e,(function(e,t){!e||e.error?o(e):n(e)}))})).then((e=>{console.log("Payment process finished",e)})).catch((e=>{alert("An error occurred during the initialization of the payment lightbox."),console.error(e)}))));return()=>{n()}}),[t,e])},i=window.wc.wcBlocksRegistry;jQuery((function(n){const a=wp.apiFetch.nonceEndpoint;n.post(a,{action:"get_payment_methods"},(function(c){c.map((function(c){let r;r="iframe"===c.integration_mode?(0,e.createElement)(o,{paymentMethodConfigurationId:c.configuration_id}):(0,e.createElement)(t,{paymentMethodConfigurationId:c.configuration_id});let s={name:c.name,label:c.label,content:r,edit:(0,e.createElement)("div",null,c.description),ariaLabel:c.ariaLabel,canMakePayment:async e=>await async function(){try{return new Promise(((e,o)=>{n.post(a,{action:"is_payment_method_available",payment_method:c.name,configuration_id:c.configuration_id},(function(n){e(n)})).fail((function(e){console.error("Error:",e),o(!1)}))}))}catch(e){return console.error("Error:",e),!1}}()};(0,i.registerPaymentMethod)(s)}))})).fail((function(e){console.error("Error getting payment methods. ",e)}))}))}(); \ No newline at end of file diff --git a/docs/en/documentation.html b/docs/en/documentation.html index 5659996..3971288 100644 --- a/docs/en/documentation.html +++ b/docs/en/documentation.html @@ -5,7 +5,7 @@ - + PostFinance Checkout WooCommerce @@ -23,7 +23,7 @@

Documentation

  • - + Source
  • diff --git a/includes/admin/class-wc-postfinancecheckout-admin-settings-page.php b/includes/admin/class-wc-postfinancecheckout-admin-settings-page.php index 4c17fcc..c56abc0 100644 --- a/includes/admin/class-wc-postfinancecheckout-admin-settings-page.php +++ b/includes/admin/class-wc-postfinancecheckout-admin-settings-page.php @@ -187,7 +187,7 @@ public function get_settings() { $settings = array( array( 'links' => array( - 'https://plugin-documentation.postfinance-checkout.ch/pfpayments/woocommerce/3.0.1/docs/en/documentation.html' => __( 'Documentation', 'woo-postfinancecheckout' ), + 'https://plugin-documentation.postfinance-checkout.ch/pfpayments/woocommerce/3.0.2/docs/en/documentation.html' => __( 'Documentation', 'woo-postfinancecheckout' ), 'https://checkout.postfinance.ch/en-ch/user/signup' => __( 'Sign Up', 'woo-postfinancecheckout' ), ), 'type' => 'postfinancecheckout_links', diff --git a/includes/class-wc-postfinancecheckout-migration.php b/includes/class-wc-postfinancecheckout-migration.php index 115ebad..b3f5fd9 100644 --- a/includes/class-wc-postfinancecheckout-migration.php +++ b/includes/class-wc-postfinancecheckout-migration.php @@ -249,7 +249,7 @@ public static function check_version() { public static function plugin_row_meta( $links, $file ) { if ( WC_POSTFINANCECHECKOUT_PLUGIN_BASENAME === $file ) { $row_meta = array( - 'docs' => '' . esc_html__( 'Documentation', 'woo-postfinancecheckout' ) . '', + 'docs' => '' . esc_html__( 'Documentation', 'woo-postfinancecheckout' ) . '', ); return array_merge( $links, $row_meta ); diff --git a/readme.txt b/readme.txt index ccc1bc6..62673f1 100644 --- a/readme.txt +++ b/readme.txt @@ -23,7 +23,7 @@ To use this extension, a PostFinance Checkout account is required. Sign up on [P == Documentation == -Additional documentation for this plugin is available [here](https://plugin-documentation.postfinance-checkout.ch/pfpayments/woocommerce/3.0.1/docs/en/documentation.html). +Additional documentation for this plugin is available [here](https://plugin-documentation.postfinance-checkout.ch/pfpayments/woocommerce/3.0.2/docs/en/documentation.html). == Support ==