From 324c1a54862fdec0e2ce9f5c67006efad4b5419f Mon Sep 17 00:00:00 2001 From: Mickey Beijer Date: Tue, 5 Jul 2022 15:00:54 +0200 Subject: [PATCH 1/2] plugin scopeconfig bugfix --- Plugin/View/Page/Config/Renderer.php | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/Plugin/View/Page/Config/Renderer.php b/Plugin/View/Page/Config/Renderer.php index 9c22ca4..39b08d1 100644 --- a/Plugin/View/Page/Config/Renderer.php +++ b/Plugin/View/Page/Config/Renderer.php @@ -1,11 +1,11 @@ config = $config; $this->scopeConfig = $scopeConfig; - $this->scopeStore = $scopeStore; $this->moduleList = $moduleList; } @@ -48,8 +43,8 @@ public function __construct( */ public function beforeRenderAssets( pageRender $subject, - $assetestlist = []) - { + $assetestlist = [] + ) { $modules = $this->moduleList->getNames(); $checkoutModules = [ @@ -58,19 +53,19 @@ public function beforeRenderAssets( ]; foreach ($checkoutModules as $key => $value) { - if (in_array($key, $modules)){ + if (in_array($key, $modules)) { $this->config->addPageAsset($value); } - if (in_array('TIG_Postcode',$modules)){ + if (in_array('TIG_Postcode', $modules)) { $this->config->addPageAsset('TIG_Postcode::css/postcode_main.css'); // check if NL is enabled if ($this->scopeConfig->getValue('tig_postcode/countries/enable_nl_check', - $this->scopeStore::SCOPE_STORE)){ + ScopeInterface::SCOPE_STORE)) { $this->config->addPageAsset('TIG_Postcode::css/postcode_nl.css'); } // check if BE is enabled if ($this->scopeConfig->getValue('tig_postcode/countries/enable_be_check', - $this->scopeStore::SCOPE_STORE)){ + ScopeInterface::SCOPE_STORE)) { $this->config->addPageAsset('TIG_Postcode::css/postcode_be.css'); } } From c35515a16d7bca3345b42419dce298f7c478c5d4 Mon Sep 17 00:00:00 2001 From: Mickey Beijer Date: Tue, 5 Jul 2022 15:03:04 +0200 Subject: [PATCH 2/2] version update --- Block/Adminhtml/Config/Support/Tab.php | 2 +- Test/Unit/Block/Adminhtml/Config/Support/TabTest.php | 2 +- composer.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Block/Adminhtml/Config/Support/Tab.php b/Block/Adminhtml/Config/Support/Tab.php index 7fc6ec4..bf8883d 100644 --- a/Block/Adminhtml/Config/Support/Tab.php +++ b/Block/Adminhtml/Config/Support/Tab.php @@ -40,7 +40,7 @@ class Tab extends Template implements RendererInterface { const MODULE_NAME = 'TIG_Postcode'; - const EXTENSION_VERSION = '1.5.0'; + const EXTENSION_VERSION = '1.5.1'; // @codingStandardsIgnoreLine protected $_template = 'TIG_Postcode::config/support/tab.phtml'; diff --git a/Test/Unit/Block/Adminhtml/Config/Support/TabTest.php b/Test/Unit/Block/Adminhtml/Config/Support/TabTest.php index 5850b9c..5211bde 100644 --- a/Test/Unit/Block/Adminhtml/Config/Support/TabTest.php +++ b/Test/Unit/Block/Adminhtml/Config/Support/TabTest.php @@ -42,7 +42,7 @@ class TabTest extends TestCase public function testGetVersionNumber() { $instance = $this->getInstance(); - $this->assertSame('1.5.0', $instance->getVersionNumber()); + $this->assertSame('1.5.1', $instance->getVersionNumber()); } public function testGetSupportedMagentoVersions() diff --git a/composer.json b/composer.json index 72e64f6..eca67c0 100644 --- a/composer.json +++ b/composer.json @@ -7,7 +7,7 @@ "magento/module-quote": ">=101.0.5,<=101.0.11|~101.1|~101.2" }, "type": "magento2-module", - "version": "1.5.0", + "version": "1.5.1", "license": "CC-BY-NC-ND-3.0", "authors": [ {