Skip to content
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

TaxJar Error displayed to customers on success page #370

Open
5 tasks
JeremyAtMethodMarketing opened this issue Dec 20, 2023 · 5 comments
Open
5 tasks

TaxJar Error displayed to customers on success page #370

JeremyAtMethodMarketing opened this issue Dec 20, 2023 · 5 comments

Comments

@JeremyAtMethodMarketing

Prerequisites

Description

I am on magento 2.4.6-p1 and using TaxJar magento2 extension 2.2.0. We are now on PHP 8.1-fpm. At checkout people are seeing deprecation notices and they believe that their orders are not being processed. They are going through but the notice is very concerning. I am also seeing that orders are not syncing to taxjar. We have not had an order sync since Dec 13, 2023.

Deprecated Functionality: Creation of dynamic property TaxJar\SalesTax\Model\Transaction\Order::$apiKey is deprecated in /html/vendor/taxjar/module-taxjar/Model/Transaction/Order.php on line 108

Steps to Reproduce

  1. Upgrade php and magento 2 version to 2.4.6
  2. Install taxjar 2.2.0
  3. place an order

Expected Result

No error message on screen shown to customers and order being synced to taxjar.

Actual Result

Orders not being synced and customers seeing deprecation notices on checkout success page.

Versions

  • [* ] Magento 2.4
  • Magento 2.3
  • [* ] Magento Open Source (fka Magento 2 Community Edition)
  • Adobe Commerce (fka Magento 2 Enterprise Edition)
  • PHP 8.2
  • [* ] PHP 8.1
  • PHP 7.4
  • PHP 7.3
@fweb
Copy link

fweb commented Feb 14, 2024

@JeremyAtMethodMarketing Did you guys ever figure out a solution? I don't want to upgrade to taxjar 2.2.0 if this is unresolved. Thx

@JeremyAtMethodMarketing
Copy link
Author

@fweb no I haven't been able to find a solution and I haven't heard any from tech support.

@SAN1TAR1UM
Copy link

SAN1TAR1UM commented Mar 19, 2024

This error means they failed to declare the $apiKey before trying to access it on line 108. You should implement the following composer patch, you don't want to modify the core file directly.

diff --git a/vendor/taxjar/module-taxjar/Model/Transaction/Order.php b/vendor/taxjar/module-taxjar/Model/Transaction/Order.php
index 875d0c0..7dafc91 100644
--- a/vendor/taxjar/module-taxjar/Model/Transaction/Order.php
+++ b/vendor/taxjar/module-taxjar/Model/Transaction/Order.php
@@ -31,6 +31,8 @@ class Order extends \Taxjar\SalesTax\Model\Transaction
 
     protected const SYNCABLE_COUNTRIES = ['US'];
 
+    protected $apiKey;
+
     /**
      * @var OrderInterface|AbstractModel
      */

@SAN1TAR1UM
Copy link

Actually I like this solution much better: #366 (comment)

@SAN1TAR1UM
Copy link

taxjar_fix_apikey.patch

This was referenced Mar 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants