Skip to content
This repository has been archived by the owner on Apr 13, 2023. It is now read-only.

Commit

Permalink
Hotfix for meta box, gave errors on other pages than Woocommerce Order
Browse files Browse the repository at this point in the history
  • Loading branch information
tig-mvonk committed Jul 28, 2021
1 parent 47d9d48 commit 94b9f41
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion includes/admin/class-gls-admin-meta-boxes.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,11 @@ public function add_meta_boxes() {
global $post;
$order = wc_get_order($post->ID);

if ($order != false && !$order->get_meta('_gls_delivery_option')) {
if ($order === false || !$order->get_meta('_gls_delivery_option')) {
return;
}

if (!$order instanceof WC_Abstract_Order) {
return;
}

Expand Down

0 comments on commit 94b9f41

Please sign in to comment.