-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Undefined $logger property in CustomerRepository plugin #353
Comments
8 tasks
8 tasks
Hi All |
We implemented this patch to temporarily fix the problem. diff --git a/vendor/taxjar/module-taxjar/Plugin/Customer/Model/ResourceModel/CustomerRepository.php b/vendor/taxjar/module-taxjar/Plugin/Customer/Model/ResourceModel/CustomerRepository.php
--- a/vendor/taxjar/module-taxjar/Plugin/Customer/Model/ResourceModel/CustomerRepository.php
+++ b/vendor/taxjar/module-taxjar/Plugin/Customer/Model/ResourceModel/CustomerRepository.php (date 1673461450000)
@@ -6,6 +6,7 @@
use Magento\Framework\Exception\LocalizedException;
use Taxjar\SalesTax\Model\Client;
use Taxjar\SalesTax\Model\ClientFactory;
+use Taxjar\SalesTax\Model\Configuration as TaxjarConfig;
class CustomerRepository
{
@@ -14,12 +15,21 @@
*/
private $clientFactory;
+ /**
+ * @var \Taxjar\SalesTax\Model\Logger
+ */
+ protected $logger;
+
/**
* @param ClientFactory $clientFactory
*/
- public function __construct(ClientFactory $clientFactory)
+ public function __construct(
+ ClientFactory $clientFactory,
+ \Taxjar\SalesTax\Model\Logger $logger
+ )
{
$this->clientFactory = $clientFactory;
+ $this->logger = $logger->setFilename(TaxjarConfig::TAXJAR_CUSTOMER_LOG);
}
/** |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Prerequisites
Description
Getting a "warning, undefined property" when trying to delete a customer. Culprit is the
$logger
property here: https://github.com/taxjar/taxjar-magento2-extension/blob/develop/Plugin/Customer/Model/ResourceModel/CustomerRepository.php#L41Steps to Reproduce
Expected Result
Customer deleted
Actual Result
Error about missing property.
Versions
The text was updated successfully, but these errors were encountered: