Skip to content

Commit c059a32

Browse files
authoredApr 26, 2024
Merge pull request #27 from TrueLayer/feature/PLUG-103
PLUG-103: Do not require billing state
2 parents 8193fb9 + 74b6173 commit c059a32

File tree

4 files changed

+11
-51
lines changed

4 files changed

+11
-51
lines changed
 

‎classes/class-truelayer-checkout.php‎

Lines changed: 0 additions & 46 deletions
This file was deleted.

‎classes/requests/post/class-truelayer-request-create-payment.php‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,16 @@ protected function get_body() {
7171
'address_line1' => $order->get_billing_address_1(),
7272
'address_line2' => $order->get_billing_address_2(),
7373
'city' => $order->get_billing_city(),
74-
'state' => ! empty( $state = $order->get_billing_state() ) ? $state : 'NA',
7574
'zip' => $order->get_billing_postcode(),
7675
'country_code' => $order->get_billing_country(),
7776
);
7877
}
7978

79+
$state = $order->get_billing_state();
80+
if( ! empty( $state ) ) {
81+
$body['user']['address']['state'] = $state;
82+
}
83+
8084
if( ! empty( $birth_date = TrueLayer_Helper_Order::get_user_date_of_birth( $order ) ) ) {
8185
$body['user']['date_of_birth'] = $birth_date;
8286
}

‎readme.txt‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ WC requires at least: 6.0.0
88
WC tested up to: 8.3.0
99
License: GPLv3
1010
License URI: http://www.gnu.org/licenses/gpl-3.0.html
11-
Stable tag: 1.4.1
11+
Stable tag: 1.4.2
1212

1313
TrueLayer for WooCommerce is a plugin that extends WooCommerce, allowing you to take payments via TrueLayer.
1414

@@ -54,6 +54,9 @@ More information on how to get started can be found in the [plugin documentation
5454
6. Read more about the configuration process in the [plugin documentation](https://docs.krokedil.com/truelayer-for-woocommerce/).
5555

5656
== CHANGELOG ==
57+
= 2024.04.26 - version 1.4.2 =
58+
* Fix - Fixes issue with billing state field being mandatory
59+
5760
= 2023.11.30 - version 1.4.1 =
5861
* Tweak - Updated Wordpress.org assets.
5962
* Tweak - Bump supported versions.

‎truelayer-for-woocommerce.php‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* Description: TrueLayer for WooCommerce.
66
* Author: Krokedil
77
* Author URI: https://krokedil.com/
8-
* Version: 1.4.1
8+
* Version: 1.4.2
99
* Text Domain: truelayer-for-woocommerce
1010
* Domain Path: /languages
1111
*
@@ -27,7 +27,7 @@
2727
define( 'TRUELAYER_WC_MAIN_FILE', __FILE__ );
2828
define( 'TRUELAYER_WC_PLUGIN_PATH', untrailingslashit( plugin_dir_path( __FILE__ ) ) );
2929
define( 'TRUELAYER_WC_PLUGIN_URL', untrailingslashit( plugin_dir_url( __FILE__ ) ) );
30-
define( 'TRUELAYER_WC_PLUGIN_VERSION', '1.4.1' );
30+
define( 'TRUELAYER_WC_PLUGIN_VERSION', '1.4.2' );
3131

3232
if ( ! class_exists( 'TrueLayer_For_WooCommerce' ) ) {
3333
/**
@@ -235,7 +235,6 @@ public function include_files() {
235235
include_once TRUELAYER_WC_PLUGIN_PATH . '/classes/class-truelayer-logger.php';
236236
include_once TRUELAYER_WC_PLUGIN_PATH . '/classes/class-truelayer-status.php';
237237
include_once TRUELAYER_WC_PLUGIN_PATH . '/classes/class-truelayer-assets.php';
238-
include_once TRUELAYER_WC_PLUGIN_PATH . '/classes/class-truelayer-checkout.php';
239238

240239
include_once TRUELAYER_WC_PLUGIN_PATH . '/classes/admin/class-wc-truelayer-banners.php';
241240
include_once TRUELAYER_WC_PLUGIN_PATH . '/classes/class-truelayer-encryption.php';

0 commit comments

Comments
 (0)
Please sign in to comment.