From 82c77a2179e20fefe4abc82e42a3276d528780fe Mon Sep 17 00:00:00 2001 From: Darin Kotter Date: Mon, 25 Mar 2024 08:12:56 -0600 Subject: [PATCH 1/5] Version bump to 4.6.0 --- package-lock.json | 4 ++-- package.json | 2 +- readme.txt | 2 +- woocommerce-square.php | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 9e96d545..83130253 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "woocommerce-square", - "version": "4.5.1", + "version": "4.6.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "woocommerce-square", - "version": "4.5.1", + "version": "4.6.0", "license": "GPL-3.0-or-later", "dependencies": { "@wordpress/data": "^8.1.0", diff --git a/package.json b/package.json index 5344f4c6..0e50203a 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "url": "git://github.com/woocommerce/woocommerce-square.git" }, "title": "WooCommerce Square", - "version": "4.5.1", + "version": "4.6.0", "homepage": "https://woocommerce.com/products/woocommerce-square/", "main": "Gruntfile.js", "scripts": { diff --git a/readme.txt b/readme.txt index 5e4c663c..4a768d0a 100644 --- a/readme.txt +++ b/readme.txt @@ -4,7 +4,7 @@ Tags: credit card, square, woocommerce, inventory sync Requires at least: 6.3 Tested up to: 6.5 Requires PHP: 7.4 -Stable tag: 4.5.1 +Stable tag: 4.6.0 License: GPL-3.0-or-later License URI: https://www.gnu.org/licenses/gpl-3.0.html diff --git a/woocommerce-square.php b/woocommerce-square.php index 6842f1f2..d0d34ecb 100644 --- a/woocommerce-square.php +++ b/woocommerce-square.php @@ -2,7 +2,7 @@ /** * Plugin Name: WooCommerce Square * Requires Plugins: woocommerce - * Version: 4.5.1 + * Version: 4.6.0 * Plugin URI: https://woocommerce.com/products/square/ * Requires at least: 6.3 * Tested up to: 6.5 @@ -29,7 +29,7 @@ defined( 'ABSPATH' ) || exit; if ( ! defined( 'WC_SQUARE_PLUGIN_VERSION' ) ) { - define( 'WC_SQUARE_PLUGIN_VERSION', '4.5.1' ); // WRCS: DEFINED_VERSION. + define( 'WC_SQUARE_PLUGIN_VERSION', '4.6.0' ); // WRCS: DEFINED_VERSION. } if ( ! defined( 'WC_SQUARE_PLUGIN_URL' ) ) { From 1d777d64a46bcebafe00504b8a7a1caa1061b820 Mon Sep 17 00:00:00 2001 From: Darin Kotter Date: Mon, 25 Mar 2024 08:15:48 -0600 Subject: [PATCH 2/5] Update since statement --- .../Admin/Payment_Gateway_Admin_Order.php | 4 ++-- .../PaymentGateway/Payment_Gateway.php | 22 +++++++++---------- includes/Gateway.php | 2 +- includes/Gateway/API.php | 6 ++--- includes/Gateway/API/Requests/Payments.php | 2 +- .../Gateway/API/Responses/Create_Payment.php | 2 +- includes/Gateway/Cash_App_Pay_Gateway.php | 6 ++--- includes/Handlers/Order.php | 2 +- 8 files changed, 23 insertions(+), 23 deletions(-) diff --git a/includes/Framework/PaymentGateway/Admin/Payment_Gateway_Admin_Order.php b/includes/Framework/PaymentGateway/Admin/Payment_Gateway_Admin_Order.php index 5429b518..06f97a65 100644 --- a/includes/Framework/PaymentGateway/Admin/Payment_Gateway_Admin_Order.php +++ b/includes/Framework/PaymentGateway/Admin/Payment_Gateway_Admin_Order.php @@ -190,7 +190,7 @@ public function maybe_add_capture_charge_bulk_order_action() { /** * Adds 'Capture charge' to the Orders screen bulk action select (HPOS). * - * @since x.x.x + * @since 4.6.0 * * @param array $bulk_actions bulk actions * @return array @@ -222,7 +222,7 @@ public function maybe_add_capture_charge_bulk_actions( $bulk_actions ) { /** * Processes the 'Capture Charge' custom bulk action in HPOS. * - * @since x.x.x + * @since 4.6.0 */ public function hpos_process_capture_charge_bulk_order_action( $redirect_to, $action, $ids ) { // bail if not processing a capture or if the user doesn't have the capability diff --git a/includes/Framework/PaymentGateway/Payment_Gateway.php b/includes/Framework/PaymentGateway/Payment_Gateway.php index a7fe7882..9c933c46 100644 --- a/includes/Framework/PaymentGateway/Payment_Gateway.php +++ b/includes/Framework/PaymentGateway/Payment_Gateway.php @@ -1680,7 +1680,7 @@ public function get_order( $order ) { /** * Performs a transaction for the given order and returns the result. * - * @since x.x.x + * @since 4.6.0 * * @param WC_Order_Square $order the order object * @param Create_Payment|null $response optional gateway transaction response @@ -2116,7 +2116,7 @@ protected function maybe_tokenize( $response, $order ) { * * This method cancels gift card payment, and adds a relevant order note. * - * @since x.x.x + * @since 4.6.0 * * @param \WC_Order $order order object * @param Payment_Gateway_API_Response $response response object @@ -3461,7 +3461,7 @@ public function supports_credit_card_partial_capture() { /** * Returns true if gateway supports authorization transactions * - * @since x.x.x + * @since 4.6.0 * @return boolean true if the gateway supports authorization */ public function supports_authorization() { @@ -3472,7 +3472,7 @@ public function supports_authorization() { /** * Returns true if gateway supports charge transactions * - * @since x.x.x + * @since 4.6.0 * @return boolean true if the gateway supports charges */ public function supports_charge() { @@ -3483,7 +3483,7 @@ public function supports_charge() { /** * Determines if gateway supports charging virtual-only orders. * - * @since x.x.x + * @since 4.6.0 * @return bool */ public function supports_charge_virtual() { @@ -3494,7 +3494,7 @@ public function supports_charge_virtual() { /** * Returns true if the gateway supports capturing a charge * - * @since x.x.x + * @since 4.6.0 * @return boolean true if the gateway supports capturing a charge */ public function supports_capture() { @@ -3505,7 +3505,7 @@ public function supports_capture() { /** * Determines if the gateway supports capturing a partial charge. * - * @since x.x.x + * @since 4.6.0 * * @return bool */ @@ -3654,7 +3654,7 @@ public function perform_credit_card_authorization( \WC_Order $order = null ) { /** * Determines if a gateway transaction should result in a charge. * - * @since x.x.x + * @since 4.6.0 * * @param \WC_Order $order Optional. The order being charged * @return bool @@ -3672,7 +3672,7 @@ public function perform_charge( \WC_Order $order = null ) { /** * Filters whether a gateway transaction should result in a charge. * - * @since x.x.x + * @since 4.6.0 * * @param bool $perform whether the transaction should result in a charge * @param \WC_Order|null $order the order being charged @@ -3685,7 +3685,7 @@ public function perform_charge( \WC_Order $order = null ) { /** * Determines if a gateway transaction should result in an authorization. * - * @since x.x.x + * @since 4.6.0 * * @param \WC_Order $order Optional. The order being authorized * @return bool @@ -4579,7 +4579,7 @@ public function is_credit_card_gateway() { /** * Returns true if this is a Cash App Pay gateway * - * @since x.x.x + * @since 4.6.0 * @return boolean true if this is a Cash App Pay gateway */ public function is_cash_app_pay_gateway() { diff --git a/includes/Gateway.php b/includes/Gateway.php index 7a336089..d8dff0f9 100644 --- a/includes/Gateway.php +++ b/includes/Gateway.php @@ -452,7 +452,7 @@ protected function do_transaction( $order ) { /** * Performs a credit card transaction for the given order and returns the result. * - * @since x.x.x + * @since 4.6.0 * * @param WC_Order_Square $order the order object * @param Create_Payment|null $response optional credit card transaction response diff --git a/includes/Gateway/API.php b/includes/Gateway/API.php index 6f809e8a..8632cc9d 100644 --- a/includes/Gateway/API.php +++ b/includes/Gateway/API.php @@ -109,7 +109,7 @@ public function credit_card_charge( \WC_Order $order ) { /** * Performs a capture for a given authorized order. * - * @since x.x.x + * @since 4.6.0 * * @param \WC_Order $order order object * @return \WooCommerce\Square\API\Response @@ -166,7 +166,7 @@ public function gift_card_charge( \WC_Order $order ) { /** * Performs a cash app pay authorization for the given order. * - * @since x.x.x + * @since 4.6.0 * * @param \WC_Order $order order object * @return \WooCommerce\Square\Gateway\API\Responses\Create_Payment @@ -659,7 +659,7 @@ public function get_payment( $payment_id ) { /** * Cancel authorized payment. * - * @since x.x.x + * @since 4.6.0 * * @param string $payment_id transaction ID * @return API\Responses\Create_Payment diff --git a/includes/Gateway/API/Requests/Payments.php b/includes/Gateway/API/Requests/Payments.php index 070727e7..8e34daf9 100644 --- a/includes/Gateway/API/Requests/Payments.php +++ b/includes/Gateway/API/Requests/Payments.php @@ -311,7 +311,7 @@ public function set_get_payment_data( $payment_id ) { /** * Sets the data for cancel a Payment. * - * @since x.x.x + * @since 4.6.0 * * @param string $payment_id payment ID */ diff --git a/includes/Gateway/API/Responses/Create_Payment.php b/includes/Gateway/API/Responses/Create_Payment.php index c926ccda..82ee6df1 100644 --- a/includes/Gateway/API/Responses/Create_Payment.php +++ b/includes/Gateway/API/Responses/Create_Payment.php @@ -160,7 +160,7 @@ public function is_cash_app_payment_completed() { /** * Returns true if the payment status is approved. * - * @since x.x.x + * @since 4.6.0 * @return boolean */ public function is_cash_app_payment_approved() { diff --git a/includes/Gateway/Cash_App_Pay_Gateway.php b/includes/Gateway/Cash_App_Pay_Gateway.php index e7550026..d63137ab 100644 --- a/includes/Gateway/Cash_App_Pay_Gateway.php +++ b/includes/Gateway/Cash_App_Pay_Gateway.php @@ -542,7 +542,7 @@ public function get_order( $order_id ) { /** * Gets an order with capture data attached. * - * @since x.x.x + * @since 4.6.0 * * @param int|\WC_Order $order order object * @param null|float $amount amount to capture @@ -790,7 +790,7 @@ public function get_payment_request() { * Get the partial amount to be paid by Cash App Pay. * This is the amount after deducting the gift card balance. * - * @since x.x.x + * @since 4.6.0 * @return float Partial amount to be paid by Cash App Pay. */ public function get_partial_cash_app_amount() { @@ -1203,7 +1203,7 @@ protected function do_transaction( $order ) { /** * Performs a credit card transaction for the given order and returns the result. * - * @since x.x.x + * @since 4.6.0 * * @param WC_Order_Square $order the order object * @param Create_Payment|null $response optional credit card transaction response diff --git a/includes/Handlers/Order.php b/includes/Handlers/Order.php index 24879849..f04a60db 100644 --- a/includes/Handlers/Order.php +++ b/includes/Handlers/Order.php @@ -664,7 +664,7 @@ public static function is_tender_type_gift_card( $order ) { /** * Returns if the order was placed using a Square cash app pay. * - * @since x.x.x + * @since 4.6.0 * * @param \WC_Order $order WooCommerce order. * From a1c528f02fb63499abec168ce81c3b3f34bef5e0 Mon Sep 17 00:00:00 2001 From: Darin Kotter Date: Mon, 25 Mar 2024 08:18:53 -0600 Subject: [PATCH 3/5] Update changelog --- changelog.txt | 11 ++++++++++- readme.txt | 11 ++++++++++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/changelog.txt b/changelog.txt index 11cf4d1d..33d0b87f 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,6 +1,15 @@ *** WooCommerce Square Changelog *** -= 4.5.2 - TBD = += 4.6.0 - 2024-03-25 = +* Add - Support for buying a Square Gift Card using Cash App Pay. +* Add - Support for splitting payments between a Square Gift Card and Cash App Pay. +* Add - Support for the “Charge” and “Authorization” transaction types in the Cash App Pay payment method. +* Dev - Declare compatibility with PHP 8.3. +* Dev - Bump WooCommerce "tested up to" version 8.7. +* Dev - Bump WooCommerce minimum supported version to 8.5 +* Dev - Bump WordPress "tested up to" version 6.5. +* Fix - Ensure a Gift Card is created when the Credit Card transaction type is "Authorization," and "Charge Virtual-Only Orders" is enabled. +* Fix - npm ERR! Missing script: "test:e2e". * Fix - Issue with Square payment gateway being shown for unsupported currencies. = 4.5.1 - 2024-02-27 = diff --git a/readme.txt b/readme.txt index 4a768d0a..c5414268 100644 --- a/readme.txt +++ b/readme.txt @@ -75,7 +75,16 @@ If you get stuck, you can ask for help in the [Plugin Forum](https://wordpress.o == Changelog == -= 4.5.2 - TBD = += 4.6.0 - 2024-03-25 = +* Add - Support for buying a Square Gift Card using Cash App Pay. +* Add - Support for splitting payments between a Square Gift Card and Cash App Pay. +* Add - Support for the “Charge” and “Authorization” transaction types in the Cash App Pay payment method. +* Dev - Declare compatibility with PHP 8.3. +* Dev - Bump WooCommerce "tested up to" version 8.7. +* Dev - Bump WooCommerce minimum supported version to 8.5 +* Dev - Bump WordPress "tested up to" version 6.5. +* Fix - Ensure a Gift Card is created when the Credit Card transaction type is "Authorization," and "Charge Virtual-Only Orders" is enabled. +* Fix - npm ERR! Missing script: "test:e2e". * Fix - Issue with Square payment gateway being shown for unsupported currencies. = 4.5.1 - 2024-02-27 = From bdb2029665134d9c60aefcf6865ee9378ee3e6f8 Mon Sep 17 00:00:00 2001 From: Dharmesh Patel Date: Tue, 26 Mar 2024 22:52:35 +0530 Subject: [PATCH 4/5] move extension after woocommerce plugin in wp-env. --- .wp-env.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.wp-env.json b/.wp-env.json index de2673da..4de54cfc 100644 --- a/.wp-env.json +++ b/.wp-env.json @@ -1,9 +1,9 @@ { "core": null, "plugins": [ - ".", "https://downloads.wordpress.org/plugin/woocommerce.zip", - "https://downloads.wordpress.org/plugin/email-log.zip" + "https://downloads.wordpress.org/plugin/email-log.zip", + "." ], "themes": [ "https://downloads.wordpress.org/theme/storefront.zip" ], "env": { From ecd9ebd771452667efa5407758546ca569b74c84 Mon Sep 17 00:00:00 2001 From: Darin Kotter Date: Wed, 27 Mar 2024 07:59:01 -0600 Subject: [PATCH 5/5] Update release date --- changelog.txt | 2 +- readme.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/changelog.txt b/changelog.txt index 33d0b87f..8c491f17 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,6 +1,6 @@ *** WooCommerce Square Changelog *** -= 4.6.0 - 2024-03-25 = += 4.6.0 - 2024-03-27 = * Add - Support for buying a Square Gift Card using Cash App Pay. * Add - Support for splitting payments between a Square Gift Card and Cash App Pay. * Add - Support for the “Charge” and “Authorization” transaction types in the Cash App Pay payment method. diff --git a/readme.txt b/readme.txt index c5414268..e600bad1 100644 --- a/readme.txt +++ b/readme.txt @@ -75,7 +75,7 @@ If you get stuck, you can ask for help in the [Plugin Forum](https://wordpress.o == Changelog == -= 4.6.0 - 2024-03-25 = += 4.6.0 - 2024-03-27 = * Add - Support for buying a Square Gift Card using Cash App Pay. * Add - Support for splitting payments between a Square Gift Card and Cash App Pay. * Add - Support for the “Charge” and “Authorization” transaction types in the Cash App Pay payment method.