Get Invoice data by invoice id Magento 2.

You can get full details of Invoice related data using invoice id in Magento 2.

Using Magento\Sales\Api\InvoiceRepositoryInterface class you can get details of invoice related data in Magento 2.

Get Invoice related data using below code snippet in Magento 2 by Invoice id, Continue reading “Get Invoice data by invoice id Magento 2.”

Write a Delete SQL query statement in Magento 2.

Write a MySQL delete query using Magento’s standard way of deleting specific rows from the database table by Magento.

You can write direct SQL query delete() without worrying about Model operation using a given code snippet in the blog. Continue reading “Write a Delete SQL query statement in Magento 2.”

How to create a plugin for after Place Order action checkout Magento 2?

You can create a plugin for after Place order action in Magento 2 using afterPlace() plugin method.

When you required to check or get data after place order in Magento 2 or save data to other tables after place order successfully You can use afterPlace plugin from OrderManagementInterface interface’s place() method.

place() method from the Magento\Sales\Api\OrderManagementInterface interface class used to Place order operation in Magento 2 from checkout page. Continue reading “How to create a plugin for after Place Order action checkout Magento 2?”