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

WooCommerce products in Lumberjack #24

Open
kristiwr opened this issue Mar 10, 2021 · 1 comment
Open

WooCommerce products in Lumberjack #24

kristiwr opened this issue Mar 10, 2021 · 1 comment

Comments

@kristiwr
Copy link

kristiwr commented Mar 10, 2021

Hello, I'm trying to figure out how to use Lumberjack with WooCommerce. I created a Product post type in Lumberjack, but when I implement the required getPostType and getPostTypeConfig methods it breaks WooCommerce because it seems to override the product post type WooCommerce had already set up. What is the best way to implement custom logic for an already-existing product post type?

@AshleyRedman
Copy link

WC will register its own post type 'product', so you can just omit that step, meaning you can go ahead and create custom templates with php or twig, just referencing 'product' as the post type. For example, in the root of the theme, you may create a 'single-product.php' as the product controller that sends the data to a twig template.
Keep in mind that the WC product system is very much based on the traditional WordPress template structure, so just take care when using WC with Lumberjack or Timber in general as I have come across a few instances where X & Y need special cases.

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

No branches or pull requests

2 participants