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

Enqueue scripts if WooCommerce is installed #473

Merged
merged 2 commits into from
May 26, 2023

Conversation

crftwrk
Copy link
Member

@crftwrk crftwrk commented May 8, 2023

This PR enables Woo scripts if plugin is installed and has no breaking changes for existing bootcommerce-child installations.

  • woocommerce-functions.php content has been moved to wc-functions.php
  • woocommerce-functions.php still exists because existing bootcommerce-child installations have require get_template_directory() . '/woocommerce/woocommerce-functions.php'; in their functions.php
  • Styles for WooCommerce gets compiled by default. Had a look to it, this are round about 700 beautified lines of compiled CSS. There is a comment that @import line can be deleted if Woo styles are not needed. Related PR for bootscore-child theme https://github.com/bootscore/bootscore-child/pull/27/files
  • When merged, we can archive or close the bootcommerce-child repo, because main-theme and bootscore-child are now be able to manage a shop. One repo less.

Tested it on some live shops and works fine.

@justinkruit if you like it, merge it.

@crftwrk crftwrk added documentation Improvements or additions to documentation WooCommerce labels May 8, 2023
@crftwrk crftwrk changed the title Enqueue scripts if woo commerce is installed Enqueue scripts if WooCommerce is installed May 8, 2023
@crftwrk crftwrk marked this pull request as draft May 8, 2023 08:47
@crftwrk crftwrk marked this pull request as ready for review May 9, 2023 07:17
@crftwrk crftwrk requested a review from justinkruit May 9, 2023 07:18
Copy link
Member

@justinkruit justinkruit left a comment

Choose a reason for hiding this comment

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

This all looks great to me, and a next step to make updates easier. 👍

@justinkruit justinkruit merged commit 50cf044 into main May 26, 2023
@crftwrk crftwrk deleted the Enqueue-scripts-if-WooCommerce-is-installed branch June 14, 2023 19:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation WooCommerce
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Merge both headers into one and enable Woo parts if WooCommerce is activated
2 participants