get(CustomOrdersTableController::class)->custom_orders_table_usage_is_enabled() ? function_exists('wc_get_page_screen_id') ? wc_get_page_screen_id('shop-order') : 'shop_order' : 'shop_order'; add_meta_box( 'payplug-transaction-details', __('PayPlug payment details', 'payplug'), [$this, 'render'], $screen, 'side' ); } /** * Render the metabox content. * * @param WP_Post $post */ public function render($post): void { $order = ($post instanceof WP_Post) ? wc_get_order($post->ID) : $post; if (false === $order) { return; } if (!in_array($order->get_payment_method(), ['payplug', 'oney_x3_with_fees', 'oney_x4_with_fees', 'oney_x3_without_fees', 'oney_x4_without_fees', 'bancontact', 'apple_pay', 'american_express', 'satispay', 'sofort', 'ideal', 'mybank', 'wero', 'bizum', 'scalapay'])) { return; } $metadata = PayplugWoocommerceHelper::get_transaction_metadata($order); $date_format = get_option('date_format', 'j F Y'); $time_format = get_option('time_format', 'G \h i \m\i\n'); if (empty($metadata)) : ?>