Fix custom Magento module with plugin that intercepts third-party module.

Job ID: 33301534

Budget: €200 – €1,500 EUR

Our module has a plugin that should execute before a method of a third-party module. It stopped working since updating Magento. We can't find the reason why it stopped working. We even did a downgrade back to the previous version, and it still didn't work.

The module we are trying to plugin to is Amasty Gift Card. The function we are trying to intercept is applyGiftCardToCart, and the class is GiftCardAccountManagement.

I have attached the plugin and di files.

Vendor/Module/Plugin/GiftCardPlugin.php
Vendor/Module/etc/di.xml
Related categories: Magento 2