Cast to array
This commit is contained in:
parent
03cf7fa572
commit
74abdf27c9
|
@ -418,6 +418,16 @@ class WC_Product {
|
|||
return apply_filters( 'woocommerce_is_sold_individually', $return, $this );
|
||||
}
|
||||
|
||||
/**
|
||||
* get_child function.
|
||||
*
|
||||
* @param mixed $child_id
|
||||
* @return WC_Product WC_Product or WC_Product_variation
|
||||
*/
|
||||
public function get_child( $child_id ) {
|
||||
return wc_get_product( $child_id );
|
||||
}
|
||||
|
||||
/**
|
||||
* get_children function.
|
||||
*
|
||||
|
|
|
@ -109,19 +109,6 @@ class WC_Product_Grouped extends WC_Product {
|
|||
return (array) $this->children;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* get_child function.
|
||||
*
|
||||
* @access public
|
||||
* @param mixed $child_id
|
||||
* @return WC_Product WC_Product or WC_Product_variation
|
||||
*/
|
||||
public function get_child( $child_id ) {
|
||||
return wc_get_product( $child_id );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns whether or not the product has any child product.
|
||||
*
|
||||
|
@ -132,7 +119,6 @@ class WC_Product_Grouped extends WC_Product {
|
|||
return sizeof( $this->get_children() ) ? true : false;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns whether or not the product is on sale.
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue