From 0e2530a3b38aef48cd504f36d3d92cac572471b2 Mon Sep 17 00:00:00 2001 From: Marcin Warzybok Date: Fri, 19 Jan 2024 11:36:40 +0100 Subject: [PATCH] SP-761 WooCommerce Update - Status --- BitPayLib/class-bitpayipnprocess.php | 2 +- BitPayLib/class-bitpaypluginsetup.php | 9 +-------- BitPayLib/class-wcgatewaybitpay.php | 1 - 3 files changed, 2 insertions(+), 10 deletions(-) diff --git a/BitPayLib/class-bitpayipnprocess.php b/BitPayLib/class-bitpayipnprocess.php index 7d22a14..257744b 100644 --- a/BitPayLib/class-bitpayipnprocess.php +++ b/BitPayLib/class-bitpayipnprocess.php @@ -260,7 +260,7 @@ private function process_refunded( Invoice $bitpay_invoice, WC_Order $order ): v private function process_processing( Invoice $bitpay_invoice, WC_Order $order ): void { $this->validate_bitpay_status_in_available_statuses( $bitpay_invoice, array( 'paid' ) ); $invoice_id = $bitpay_invoice->getId(); - $order->add_order_note( $this->get_start_order_note( $invoice_id) . 'is paid and awaiting confirmation.' ); + $order->add_order_note( $this->get_start_order_note( $invoice_id ) . 'is paid and awaiting confirmation.' ); $wordpress_order_status = $this->get_gateway_settings()['bitpay_checkout_order_process_paid_status']; if ( WcGatewayBitpay::IGNORE_STATUS_VALUE === $wordpress_order_status ) { diff --git a/BitPayLib/class-bitpaypluginsetup.php b/BitPayLib/class-bitpaypluginsetup.php index cc40a10..f8df946 100644 --- a/BitPayLib/class-bitpaypluginsetup.php +++ b/BitPayLib/class-bitpaypluginsetup.php @@ -188,7 +188,7 @@ public function add_error_page(): void { private function validate_woo_commerce(): array { global $woocommerce; - if ( true === empty( $woocommerce ) ) { + if ( null === $woocommerce ) { return array( 'The WooCommerce plugin for WordPress needs to be installed and activated. Please contact your web server administrator for assistance.' ); } @@ -217,12 +217,5 @@ function () { }, 5 ); - - add_action( - 'woocommerce_blocks_payment_method_type_registration', - function ( $registry ) { - $registry->register( new BitPayPaymentsBlocks() ); - } - ); } } diff --git a/BitPayLib/class-wcgatewaybitpay.php b/BitPayLib/class-wcgatewaybitpay.php index bd08b08..169d7b5 100644 --- a/BitPayLib/class-wcgatewaybitpay.php +++ b/BitPayLib/class-wcgatewaybitpay.php @@ -26,7 +26,6 @@ public function __construct() { $this->has_fields = true; $this->method_title = __( $this->get_bitpay_version_info(), 'wc-bitpay' ); // phpcs:ignore - $this->method_label = __( 'BitPay', 'wc-bitpay' ); $this->method_description = __( 'Expand your payment options by accepting cryptocurrency payments (BTC, BCH, ETH, and Stable Coins) without risk or price fluctuations.', 'wc-bitpay' ); if ( empty( $_GET['woo-bitpay-return'] ) ) { // phpcs:ignore