diff --git a/CHANGELOG.MD b/CHANGELOG.MD index c21bfe3..f1a708e 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -1,3 +1,7 @@ +## 1.8.0 + +* Add HPOS compatibility + ## 1.7.8 * Version bump, again diff --git a/assets/js/ledyer-checkout-for-woocommerce.js b/assets/js/ledyer-checkout-for-woocommerce.js index f7f9d5b..d36c6c3 100644 --- a/assets/js/ledyer-checkout-for-woocommerce.js +++ b/assets/js/ledyer-checkout-for-woocommerce.js @@ -318,16 +318,6 @@ jQuery(function ($) { ); }, - /** - * Logs messages to the console. - * @param {string} message - */ - log: function (message) { - if (lco_params.logging) { - console.log(message); - } - }, - /** * Fails the Ledyer order. * @param {string} error_message diff --git a/classes/class-ledyer-lco-gateway.php b/classes/class-ledyer-lco-gateway.php index b6021d4..aa141ac 100644 --- a/classes/class-ledyer-lco-gateway.php +++ b/classes/class-ledyer-lco-gateway.php @@ -273,7 +273,7 @@ public function process_payment_handler( $order_id ) { return false; } - if ( $order_id && $ledyer_order ) { + if ( $order && $ledyer_order ) { $customer_billing = isset( $ledyer_order['customer']['billingAddress'] ) ? $ledyer_order['customer']['billingAddress'] : false; $customer_shipping = isset( $ledyer_order['customer']['shippingAddress'] ) ? $ledyer_order['customer']['shippingAddress'] : false; @@ -588,6 +588,10 @@ public function ledyer_order_shipping_fields( $order ) { } public function ledyer_order_save_custom_fields( $order_id ) { + $order = wc_get_order($order_id); + if (!$order) { + return; + } $order->update_meta_data( '_billing_attention_name', sanitize_text_field( $_POST[ '_billing_attention_name' ] ) ); $order->update_meta_data( '_billing_care_of', sanitize_text_field( $_POST[ '_billing_care_of' ] ) ); $order->update_meta_data( '_shipping_attention_name', sanitize_text_field( $_POST[ '_shipping_attention_name' ] ) ); diff --git a/classes/class-ledyer-main.php b/classes/class-ledyer-main.php index 66415a7..74b942e 100644 --- a/classes/class-ledyer-main.php +++ b/classes/class-ledyer-main.php @@ -51,7 +51,7 @@ class Ledyer_Checkout_For_WooCommerce { */ public $checkout; - const VERSION = '1.7.8'; + const VERSION = '1.8.0'; const SLUG = 'ledyer-checkout-for-woocommerce'; const SETTINGS = 'ledyer_checkout_for_woocommerce_settings'; diff --git a/languages/ledyer-checkout-for-woocommerce.pot b/languages/ledyer-checkout-for-woocommerce.pot index 17f93c0..6a8ba29 100644 --- a/languages/ledyer-checkout-for-woocommerce.pot +++ b/languages/ledyer-checkout-for-woocommerce.pot @@ -2,7 +2,7 @@ # This file is distributed under the same license as the Ledyer Checkout for WooCommerce plugin. msgid "" msgstr "" -"Project-Id-Version: Ledyer Checkout for WooCommerce 1.7.8\n" +"Project-Id-Version: Ledyer Checkout for WooCommerce 1.8.0\n" "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/ledyer-checkout-for-woocommerce\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/ledyer-checkout-for-woocommerce.php b/ledyer-checkout-for-woocommerce.php index 2cf8a67..58c39f2 100644 --- a/ledyer-checkout-for-woocommerce.php +++ b/ledyer-checkout-for-woocommerce.php @@ -5,7 +5,7 @@ * Description: Ledyer Checkout payment gateway for WooCommerce. * Author: Maksimer/Ledyer * Author URI: https://www.maksimer.com/ - * Version: 1.7.8 + * Version: 1.8.0 * Text Domain: ledyer-checkout-for-woocommerce * Domain Path: /languages * diff --git a/readme.txt b/readme.txt index 02cc7c2..71b908c 100644 --- a/readme.txt +++ b/readme.txt @@ -7,6 +7,6 @@ Tested up to: 6.3 Requires PHP: 7.0 WC requires at least: 4.0.0 WC tested up to: 8.2.0 -Stable tag: 1.7.8 +Stable tag: 1.8.0 License: GPLv3 or later License URI: http://www.gnu.org/licenses/gpl-3.0.html