• Resolved liappi

    (@liappi)


    Hi there,

    I’d like to override the eway-cc-form.php template for the credit card payment page where users can enter their credit card details. Is this possible, and if so, how can I do this? What would be the path I would need to copy the template into?

    Thanks!

    • This topic was modified 3 years, 10 months ago by liappi.

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Grigorij S. a11n

    (@grigaswp)

    Hi there,

    Thank you for reaching out!

    I understand that you’d like to override the eway-cc-form.php template file.

    Before we continue, please note that I’m not a developer and the assistance I can provide with this kind of customization is limited, but I’ll be happy to point you in the right direction.

    The eway-cc-form.php file is in the “templates” folder of the eWAY plugin and this support document explains the process of overriding template files:

    https://docs.woocommerce.com/document/template-structure/#how-to-edit-files

    So it sounds like you’ll have to copy content/plugins/eWAY/templates/eway-cc-form.php to wp-content/themes/yourtheme/eWAY and work on that copy, although the exact path might be slightly different.

    I hope this helps!

    Thread Starter liappi

    (@liappi)

    Hi Grigorij,

    As far as I can tell, that seems to be specific to templates from the Woocommerce plugin itself, and it doesn’t seem to work for the eWAY plugin – I tried copying wp-content/plugins/woocommerce-gateway-eway/templates/eway-cc-form.php to wp-content/themes/astra-child/woocommerce-gateway-eway/eway-cc-form.php and it didn’t work. It also didn’t work when I replaced woocommerce-gateway-eway with woocommerce. So I’d just like to know, is there actually support for this in the eWAY plugin?

    Thanks!

    Plugin Support Tseten a11n

    (@tibetanitech)

    Hi @liappi

    As Grig mentioned, we are not developers who can assist you with complex custom code requests.

    After looking further into this, I found that maybe the template overwrite will not work with this directly via child-theme.

    There are a few things you can do.

    1. Try and use PHP, hooks/filters to accomplish this.
    2. Un-enqueue the JS files and re-enqueue your own.
    3. Make a duplicate of the plugin with your changes and use that one. When new plugins are released, merge and keep using your own. You can have the original installed, but not active.

    I also found the following post online that might help you get started:

    https://jeroensormani.com/how-to-add-template-files-in-your-plugin/

    Nico

    (@nicolamustone)

    Automattic Happiness Engineer

    We haven’t heard back from you in a while, so I’m going to mark this as resolved – if you have any further questions, you can start a new thread.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Customizing templates’ is closed to new replies.