How to override my plugin’s php classes with duplicates that are in my child theme folder

I have a child theme in wordpress and one of the plugins I am using is called jigoshop.

I made a copy of a few php classes from the plugin and placed them in my child theme folder. I want these clases to override the ones from the plugin folder.

How would I go about doing that?

Thanks!!

1 Answer
1

I’m assuming this is mostlikly a hiearcy problem. For example, your stylesheets load in the order of child theme then plugin. What you need is to load the plugin styles first then your child theme.

You have a few options:

  1. Add the Css for your plugin manually after wp_head() in your header.php
  2. Unregister the plugin css file and then load all the styles in your theme’s styles.css
  3. Register a new style to be inserted after the plugin runs.

Without really digging into the plugin or your code it’s hard to give you an example.

Leave a Comment