Skip to content

Commit 8861dd1

Browse files
committed
Convert middle alignement tabs to spaces, null control
1 parent 6667b81 commit 8861dd1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

includes/model/class-product-variation.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,11 +215,11 @@ protected function init() {
215215
'salePriceRaw' => function () {
216216
return ! empty( $this->wc_data->get_sale_price() ) ? $this->wc_data->get_sale_price() : null;
217217
},
218-
'shippingClass' => function () {
218+
'shippingClass' => function () {
219219
$shipping_class_id = $this->wc_data->get_shipping_class_id();
220220
$shipping_class_term = get_term( $shipping_class_id, 'product_shipping_class' );
221221

222-
if ( ! is_wp_error( $shipping_class_term ) && is_a( $shipping_class_term, 'WP_Term' ) ) {
222+
if ( ! is_wp_error( $shipping_class_term ) && ! is_null( $shipping_class_term ) && is_a( $shipping_class_term, 'WP_Term' ) ) {
223223
$shipping_class = $shipping_class_term;
224224
}
225225

0 commit comments

Comments
 (0)