I have added a custom checkout step in magento 2. How can i remove that specific step in one page checkout by checking quote item specific option value ?

I can not specify condition in xml file, Is there any way that I can override a one page checkout block and do that there ?

Please suggest!


1 Answer 1


You can use

<action method="unsetElement"><argument name="name" xsi:type="string" helper="yourmodule/helper/methodname" /></action>

Thanks should be placed under parent block of block that you are going to remove.

Inside the method of helper put your business logic and finally return a block string . If you want to remove any block then block name will be return as string.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.