Magento – Place order button in Magento 2 checkout

checkoutmagento2orderspayment-methods

I am using Check / Money Order payment method in my website.

I want to change the text of "Place Order" button on the checkout page.

enter image description here

I tried to change the following file:

vendor/magento/module-offline-payments/view/frontend/web/template/payment/checkmo.html

but nothing is changing on frontend.

Actually I want to override this template into my own module but it is unable to change anything even changing directly to above file location.

Can anybody help me?

Best Answer

Why you try to do this way for changing text?

You can do this simply by translation.

Create a i18n/en_US.csv inside your theme

OR

Inside your module create i18n/en_US.csv, In that case make sure your module load after Magento_Checkout module. So module.xml looks like:

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
    <module name="Vendor_Module" setup_version="2.0.0">
        <sequence>
            <module name="Magento_Checkout"/>
        </sequence>
    </module>
</config>

Your csv content should be

"Place Order","Do you like Place Order?"

Clear all cache.