diff --git a/CHANGELOG.md b/CHANGELOG.md index bad647fd..be5d40d4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,9 @@ # Changelog All notable changes to this project will be documented in this file. +## [3.7.8] +- Fix: Remove restriction on order lines when placing an order. + ## [3.7.7] - Fix: Apple Pay - Incorrect transaction amounts with custom currency configurations. diff --git a/altapay.php b/altapay.php index fdd2d207..5f10e94b 100755 --- a/altapay.php +++ b/altapay.php @@ -7,7 +7,7 @@ * Author URI: https://altapay.com * Text Domain: altapay * Domain Path: /languages - * Version: 3.7.7 + * Version: 3.7.8 * Name: SDM_Altapay * WC requires at least: 3.9.0 * WC tested up to: 9.7.1 @@ -41,7 +41,7 @@ } if ( ! defined( 'ALTAPAY_PLUGIN_VERSION' ) ) { - define( 'ALTAPAY_PLUGIN_VERSION', '3.7.7' ); + define( 'ALTAPAY_PLUGIN_VERSION', '3.7.8' ); } // Include the autoloader, so we can dynamically include the rest of the classes. diff --git a/classes/util/UtilMethods.php b/classes/util/UtilMethods.php index 58a55f99..9a24a57a 100755 --- a/classes/util/UtilMethods.php +++ b/classes/util/UtilMethods.php @@ -9,8 +9,6 @@ namespace Altapay\Classes\Util; -use WC_Coupon; -use WP_Error; use Altapay\Request\OrderLine; class UtilMethods { @@ -39,11 +37,6 @@ public function createOrderLines( $order, $products = array(), $wcRefund = false $cartItems = $itemsToCapture; } - // if cart is empty - if ( ! $cartItems ) { - return new WP_Error( 'error', __( 'There are no items in the cart ', 'altapay' ) ); - } - $i = 0; // generate order lines product by product diff --git a/readme.txt b/readme.txt index 6d0a5b3c..db46d28b 100644 --- a/readme.txt +++ b/readme.txt @@ -4,7 +4,7 @@ Tags: AltaPay, Gateway, Payments, WooCommerce, Payment Card Industry Requires PHP: 7.4 Requires at least: 5.0 Tested up to: 6.7.2 -Stable tag: 3.7.7 +Stable tag: 3.7.8 License: MIT WC requires at least: 3.9.0 WC tested up to: 9.7.1 @@ -39,6 +39,9 @@ AltaPay's Payment Gateway for WooCommerce provides merchants with access to a fu == Changelog == += 3.7.8 = +* Fix: Remove restriction on order lines when placing an order. + = 3.7.7 = * Fix: Apple Pay - Incorrect transaction amounts with custom currency configurations. diff --git a/views/paymentClass.tpl b/views/paymentClass.tpl index 12c41251..2d5c72f2 100755 --- a/views/paymentClass.tpl +++ b/views/paymentClass.tpl @@ -304,12 +304,10 @@ class WC_Gateway_{key} extends WC_Payment_Gateway { 'subscription', 'subscriptionAndCharge' ] ) ); - if ( $orderLines instanceof WP_Error ) { - return $orderLines; // Some error occurred - } - - $request->setOrderLines( $orderLines ); + if ( $orderLines ) { + $request->setOrderLines( $orderLines ); + } if ( $request ) { try {