Cast to array

This commit is contained in:
Mike Jolley 2015-02-03 15:06:08 +00:00
parent 03cf7fa572
commit 74abdf27c9
2 changed files with 10 additions and 14 deletions

View File

@ -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.
*

View File

@ -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.
*