This commit is contained in:
Prospress Inc
2017-06-09 16:36:26 +02:00
committed by Remco Tolsma
parent 5e536ec717
commit b99eba2f79
51 changed files with 1413 additions and 642 deletions

View File

@@ -355,7 +355,7 @@ function wcs_validate_new_order_type( $type ) {
* @return array
*/
function wcs_get_order_address( $order, $address_type = 'shipping' ) {
if ( ! is_object( $order ) ) {
if ( ! is_a( $order, 'WC_Abstract_Order' ) ) {
return array();
}
@@ -405,8 +405,8 @@ function wcs_order_contains_subscription( $order, $order_type = array( 'parent',
$order_type = array( $order_type );
}
if ( ! is_object( $order ) ) {
$order = new WC_Order( $order );
if ( ! is_a( $order, 'WC_Abstract_Order' ) ) {
$order = wc_get_order( $order );
}
$contains_subscription = false;