Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
How can i apply coupon code programatically in magento 2 using cartid.
I believe checkout session can be used instead cartId use below code:
1 => Define \Magento\Checkout\Model\Session in your constructor
Required, but never shown