Nebula is a WordPress theme framework that focuses on enhancing development. The core features of Nebula make it a powerful tool for designing, developing, and analyzing WordPress websites consistently, yet its deliberately uncomplicated code syntax also serves as a learning resource for programmers themselves.
The global $product is only an object of class WC_Product when the_post() is used. Else, it comes over as a string, causing fatal errors with the rest of the script.
What is the new behavior?
If the $product is not an object, it performs a lookup for the product by the ID before continuing.
Types of change(s)
Bug fix/patch
What problem does this address?
The global
$product
is only an object of class WC_Product whenthe_post()
is used. Else, it comes over as a string, causing fatal errors with the rest of the script.What is the new behavior?
If the
$product
is not an object, it performs a lookup for the product by the ID before continuing.