From 6d06869309ba6e1deafcec3d6691cb9f75cf4b19 Mon Sep 17 00:00:00 2001 From: Daniel Kudwien Date: Tue, 26 Jan 2021 12:32:49 +0100 Subject: [PATCH] Fixed PHP notice on other admin pages. (#1) --- includes/class-wc-amazon-payments-advanced-order-admin.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/includes/class-wc-amazon-payments-advanced-order-admin.php b/includes/class-wc-amazon-payments-advanced-order-admin.php index 07b56067..7a9a8d68 100644 --- a/includes/class-wc-amazon-payments-advanced-order-admin.php +++ b/includes/class-wc-amazon-payments-advanced-order-admin.php @@ -167,6 +167,9 @@ public function meta_box() { public function authorization_box() { global $post, $wpdb, $theorder; + if ( empty( $post->ID ) ) { + return; + } $actions = array(); $order_id = absint( $post->ID );