Closed sethobey-stripe closed 1 year ago
I'm not sure I understand why this was needed. The customer_save_before
event has not gone anywhere, nor is it going away. The adminhtml_customer_prepare_save
event has been in the codebase since 2.0.0.0-dev87 (10 years ago).
Since this change, we have been seeing odd behavior surrounding customer sync. Before I open an issue, is it possible to understand why this change was even needed?
Context
At some point the Magento customer module updated the event name
customer_save_before
toadminhtml_customer_prepare_save
where the former was used to trigger customer updates in TaxJar and the eventcustomer_delete_before
which was used to trigger customer deletion in TaxJar no longer exists.Additionally, custom attributes added to the the customer model should now be fetched using the
getCustomAttribute()
method rather than calling the previous magic methods.i.e.
$customer->getTjCustomValue()
is now$customer->getCustomAttribute('tj_custom_value')
Description
TaxJar\SalesTax\Plugin\Customer\Model\ResourceModel\CustomerRepository::beforeDeleteById
that replaces the non-functional delete observerPerformance
N/A
Testing
Versions