From 1a49ba16199476dbd11e7f9c82339726ac1e773b Mon Sep 17 00:00:00 2001 From: Montazar Date: Wed, 26 Jun 2024 13:11:10 +0200 Subject: [PATCH 1/3] Fix inverse if statement (#178) We should check if `! dwc_is_express`. That is, only return if it is _not_ express. Reordered `if` statements to avoid reading from the database (`get_option`) unless we're sure if this is a page we need the CSS file for. --- classes/class-dintero-checkout-assets.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/classes/class-dintero-checkout-assets.php b/classes/class-dintero-checkout-assets.php index 278b6b6..3cad681 100644 --- a/classes/class-dintero-checkout-assets.php +++ b/classes/class-dintero-checkout-assets.php @@ -30,17 +30,19 @@ public function __construct() { * Loads style for the plugin. */ public function dintero_load_css() { - $settings = get_option( 'woocommerce_dintero_checkout_settings' ); - if ( dwc_is_express( $settings ) ) { - return; - } if ( ! is_checkout() ) { return; } + if ( is_order_received_page() ) { return; } + $settings = get_option( 'woocommerce_dintero_checkout_settings' ); + if ( ! dwc_is_express( $settings ) ) { + return; + } + wp_register_style( 'dintero-checkout-style', DINTERO_CHECKOUT_URL . '/assets/css/dintero-checkout-express.css', From 24656a97091ed794b268778deee0ad8fd17d0163 Mon Sep 17 00:00:00 2001 From: Montazar Date: Wed, 26 Jun 2024 15:26:17 +0200 Subject: [PATCH 2/3] Version 1.10.4 --- dintero-checkout-for-woocommerce.php | 4 ++-- readme.txt | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/dintero-checkout-for-woocommerce.php b/dintero-checkout-for-woocommerce.php index cf22501..4307e84 100644 --- a/dintero-checkout-for-woocommerce.php +++ b/dintero-checkout-for-woocommerce.php @@ -5,7 +5,7 @@ * Description: Dintero offers a complete payment solution. Simplifying the payment process for you and the customer. * Author: Dintero, Krokedil * Author URI: https://krokedil.com/ - * Version: 1.10.3 + * Version: 1.10.4 * Text Domain: dintero-checkout-for-woocommerce * Domain Path: /languages * @@ -22,7 +22,7 @@ exit; } -define( 'DINTERO_CHECKOUT_VERSION', '1.10.3' ); +define( 'DINTERO_CHECKOUT_VERSION', '1.10.4' ); define( 'DINTERO_CHECKOUT_URL', untrailingslashit( plugins_url( '/', __FILE__ ) ) ); define( 'DINTERO_CHECKOUT_PATH', untrailingslashit( plugin_dir_path( __FILE__ ) ) ); define( 'DINTERO_CHECKOUT_MAIN_FILE', __FILE__ ); diff --git a/readme.txt b/readme.txt index 92c4301..4caf45b 100644 --- a/readme.txt +++ b/readme.txt @@ -82,6 +82,9 @@ Go to [https://www.dintero.com/contact-us](https://www.dintero.com/contact-us) t 1. The plugin settings screen where you set up the details to connect to Dintero. == Changelog == += 2024.06.26 - version 1.10.3 = +* Fix - Fixed an issue where the CSS file was not enqueued causing the checkout layout for Express checkout to always be a single-column. + = 2024.06.25 - version 1.10.3 = * Fix - Fixed critical error when reading settings. From 7ce046f9751b232568fcdfb24be18ce483b4fdb0 Mon Sep 17 00:00:00 2001 From: Montazar Date: Wed, 26 Jun 2024 15:26:58 +0200 Subject: [PATCH 3/3] Update version number in README --- readme.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.txt b/readme.txt index 4caf45b..318a49c 100644 --- a/readme.txt +++ b/readme.txt @@ -82,7 +82,7 @@ Go to [https://www.dintero.com/contact-us](https://www.dintero.com/contact-us) t 1. The plugin settings screen where you set up the details to connect to Dintero. == Changelog == -= 2024.06.26 - version 1.10.3 = += 2024.06.26 - version 1.10.4 = * Fix - Fixed an issue where the CSS file was not enqueued causing the checkout layout for Express checkout to always be a single-column. = 2024.06.25 - version 1.10.3 =