Create a Plugin for Save Payment Information Checkout Magento 2.

You can create a Plugin for the method SavePaymentInformation() in Magento 2 to add your logic before or after Payment information is saved.

The method will be called after a click on the Place order button from the second step of the Checkout page.

Original Class to create plugin:
Magento\Checkout\Model\PaymentInformationManagement Continue reading “Create a Plugin for Save Payment Information Checkout Magento 2.”

Create plugin for Calculate method of Totals Information ManagementInterface Magento 2.

Magento 2,  You can create a plugin to TotalsInformationManagementInterface of Checkout Module to modify or change quote total.

An Interface responsible for Calculate quote totals based on address and shipping method. Continue reading “Create plugin for Calculate method of Totals Information ManagementInterface Magento 2.”

Plugin for Subscribe() method of email subscription Magento 2.

Subscribe by Email id in Magento 2 Use Subscribe($email) method to newsletter subscription in native code.

Native Class:
Magento\Newsletter\Model\Subscriber (Magento_Newsletter) Continue reading “Plugin for Subscribe() method of email subscription Magento 2.”