Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for theme template directory issue #167 #169

Merged
merged 2 commits into from
Jan 11, 2020
Merged

Fix for theme template directory issue #167 #169

merged 2 commits into from
Jan 11, 2020

Conversation

timbocode
Copy link
Contributor

All Submissions:

Changes proposed in this Pull Request:

Closes #167 .

How to test the changes in this Pull Request:

  1. Create a directory called 'woocommerce' below the active theme directory (e.g. 'mytheme/woocommerce').
  2. Copy the 'single-product.php' template file from 'plugins/woocommerce/templates' to 'mytheme/woocommerce'.
  3. Make a minor modification to this file (e.g. <?php echo "Hello World"; ?>). On the frontend product page, you should see Hello World.
  4. Create a directory called 'classic-commerce' below the active theme directory.
  5. Copy the 'single-product.php' template file from 'plugins/woocommerce/templates' to 'mytheme/classic-commerce'.
  6. Make a different modification to this file (e.g. <?php echo "Hello Classic Commerce"; ?>). On the frontend, you should now see Hello Classic Commerce.
  7. If you delete 'mytheme/woocommerce', you should still see Hello Classic Commerce.

Changelog entry

Enter a short summary of all changes on this Pull Request. This will appear in the changelog if accepted.

Added support for template overrides using a directory called 'classic-commerce' below the active theme. The 'classic-commerce' directory takes priority over any existing 'woocommerce' directory.

@timbocode timbocode added this to the 1.0.0-alpha3 milestone Jan 11, 2020
@timbocode timbocode requested review from bahiirwa and a user January 11, 2020 19:23
@timbocode timbocode self-assigned this Jan 11, 2020
Copy link
Collaborator

@bahiirwa bahiirwa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tried and tested. Works well.

@bahiirwa bahiirwa merged commit 007c4b3 into ClassicPress:develop Jan 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Custom folder in child theme should be recognised whether named WC or CC
2 participants