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 fatal error when no product id passed to wc_get_product #884

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from

Conversation

ilearnio
Copy link

@ilearnio ilearnio commented Sep 1, 2021

Issue: #883

Ticket:

Slack thread:


Description

Fixes fatal error that happens when navigating to a post of type "page" that has a shortcode [product_page id="ID"]. The error was happening because product ID was not detected for such a page and thus wc_get_product (that was called with no args) couldn't detect the product automatically, which caused error in intenal WC code.

Steps to test:

  1. Add a product to home page with a shortcode [product_page id="ID"]
  2. Navigate to home page

Documentation

  • This PR needs documentation (has the "Documentation" label).

Changelog entry

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

Closes #883 .

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.

Fatal error on home page after installing the plugin
1 participant