0

I'm trying to override this Dokan plugin file in a child theme:

wp-content/plugins/dokan-pro/includes/modules/vendor-verification/templates/verification-new.php

I can successfully override files in the normal Dokan templates folder:

wp-content/plugins/dokan-pro/templates/path-to-file.php

by using

wp-content/themes/theme-child/dokan/path-to-file.php

However, because the file I wish to override is in the includes folder, I'm having trouble finding the correct file path to override the verification-new.php file.

Any ideas?

P.S. The reason why I wish to override the file in a child theme rather than simply edit the original is so I can update Dokan and not lose the changes.

  • Keep in mind that Dokan Pro is a premium theme, 3rd party themes are offtopic here – Tom J Nowell Nov 12 at 18:55
  • Thanks, I didn't know that. – InstaLoad WP Nov 13 at 19:12
1

Child themes let you override templates, but these are not templates you're attempting to override. You can't drop in arbitrary files and override the parent theme, and WordPress can't do it's magic when include or require are used to load files.

The reason this works for templates, is because WordPress doesn't load them with include, instead it uses filterable functions with custom logic, such as get_template_part.

So there is no way to use the child theme method to swap out that file. You do have the advantage that the child themes functions.php loads first.

Instead, you're going to have to look at how the code in that theme loads itself, if it provides filters and actions, etc, much like you would when trying to override plugin code.

You'll need to contact the vendor for documentation and support, afterall you're a paying customer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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