• Resolved Afnan Abbasi

    (@afnangulabbasi)


    Hi,

    I have edited the Styling Stripe payment request button (basically used an image instead of the current button added by the plugin) by using some custom code in the following two files:
    woocommerce-gateway-stripe/assets/js/stripe-payment-request.min.js
    woocommerce-gateway-stripe/assets/js/stripe-payment-request.js

    However I want to get future updates of the plugin as well. Is there a way I can keep the changes of these two files separately and override them whenever the plugin is updated since not updating the plugin is not a good thing to do?

    Your help would be appreciated.

    Regards,
    Afnan

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Shane Eckert

    (@shaneeckert)

    Automattic Happiness Engineer

    Hi Afnan,

    I am afraid there is not plugin version of a child theme so that your changes will not be overwritten.

    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.

    Cheers!

    Thread Starter Afnan Abbasi

    (@afnangulabbasi)

    Ok, thanks for your response. I have disabled the plugin updates for a while, which is probably not a good approach but I will be updating with time the plugin and add my edited files.

    The un-enqueue and re-enqueue approach sounds good.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to override the plugin files?’ is closed to new replies.