Fix incorrect return type documentation for product factory `get_product()`.

This method returns `false` if the product cannot be loaded, not `null`.
This commit is contained in:
Reüel van der Steege 2018-11-29 15:25:24 +01:00 committed by GitHub
parent 7049cd28e9
commit b433219f71
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -20,7 +20,7 @@ class WC_Product_Factory {
*
* @param mixed $product_id WC_Product|WP_Post|int|bool $product Product instance, post instance, numeric or false to use global $post.
* @param array $deprecated Previously used to pass arguments to the factory, e.g. to force a type.
* @return WC_Product|bool Product object or null if the product cannot be loaded.
* @return WC_Product|bool Product object or false if the product cannot be loaded.
*/
public function get_product( $product_id = false, $deprecated = array() ) {
$product_id = $this->get_product_id( $product_id );