Sometimes plugins and snippets out there uses this code to add custom lines to the cart (not instance of WC_Product):
WC()->cart->add_to_cart( array );
This is causing a fatal error on $product->get_sku().
Steps to test:
For instance, install LMS Masterstudy (free plugin from WordPress.org)
In options activate WC Checkout; then create a course and add it to the cart
Just complete the checkout and boom! Fatal error instead of the thank you 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 nothing; issue not reported, preferred to send this pull request.
Description
Sometimes plugins and snippets out there uses this code to add custom lines to the cart (not instance of WC_Product):
WC()->cart->add_to_cart( array );
This is causing a fatal error on
$product->get_sku()
.Steps to test:
Documentation
Changelog entry
Closes nothing; issue not reported, preferred to send this pull request.