Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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.

Expand Down
4 changes: 2 additions & 2 deletions altapay.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down
7 changes: 0 additions & 7 deletions classes/util/UtilMethods.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@

namespace Altapay\Classes\Util;

use WC_Coupon;
use WP_Error;
use Altapay\Request\OrderLine;

class UtilMethods {
Expand Down Expand Up @@ -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
Expand Down
5 changes: 4 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.

Expand Down
8 changes: 3 additions & 5 deletions views/paymentClass.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Loading