Hello,
I want to overwrite wordpress plugin file with Sage
File is located under plugindirectory/filename.html.php
to be replaced in :
themedirectory/pluginpath/filename.html.php or blade php
I have googled for any solution , the only one found is for woocommerce
Thanks in advance
It depends on the plugin. Does the plugin in question use the WordPress template loading? Then the template can be overridden using a filter. Otherwise the plugin itself should offer a filter for the template path.
You can create a new issue on the plugin issue tracker and request filters for those templates:
Until the author has added this functionality, you can fork the plugin (on GitHub, private GitLab, or some other repository, depending on the deployment flow you are using), add the filters by yourself and use those filters in your e.g. theme or site plugin to let the plugin use your own, custom template files instead.
Hi,
Unfortunately we don’t have filers for those at the moment but will consider adding some in future releases.
Alternately, you can simply replace include_once(WPABSTRACTS_PLUGIN_DIR . ‘users/register.html.php’); in the register.php file with the path of your custom template when the filters are added in the future you can simply add a filter with the path to your custom template for the same effect.
Please let me know if you have more questions,
Kevon A
So until this feature is added to the plugin, you would want to fork the whole plugin repository and add the filters yourself so you can override them in your theme/site plugin.
I haven’t found a GitHub repository for this plugin code, but plugins on the WordPress plugin directory all have their dedicated SVN repository: https://plugins.trac.wordpress.org/browser/wp-abstracts-manuscripts-manager/trunk
So you can use svn checkout to clone that repository to your workstation and add the modifications on top (as separate branch preferably) - or import it in git and do the fork there. In the end you would install the plugin you forked from your own repository (e.g. privately hosted on GitHub or GitLab, whatever you choose) with the added filters.