File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments