Only display attribution meta boxes for valid orders
This commit is contained in:
parent
c4ec613277
commit
7c1d6b6d7c
|
@ -241,7 +241,9 @@ class Edit {
|
|||
sprintf( __( '%s information', 'woocommerce' ), $title ),
|
||||
function( $post_or_order ) use ( $source_attribution_meta_box ) {
|
||||
$order = $post_or_order instanceof WC_Order ? $post_or_order : wc_get_order( $post_or_order );
|
||||
if ( $order instanceof WC_Order ) {
|
||||
$source_attribution_meta_box->output( $order );
|
||||
}
|
||||
},
|
||||
$screen_id,
|
||||
'side',
|
||||
|
@ -260,7 +262,9 @@ class Edit {
|
|||
__( 'Customer History', 'woocommerce' ),
|
||||
function( $post_or_order ) use ( $customer_history_meta_box ) {
|
||||
$order = $post_or_order instanceof WC_Order ? $post_or_order : wc_get_order( $post_or_order );
|
||||
if ( $order instanceof WC_Order ) {
|
||||
$customer_history_meta_box->output( $order );
|
||||
}
|
||||
},
|
||||
$screen_id,
|
||||
'side',
|
||||
|
|
Loading…
Reference in New Issue