You can use the other action which called before wp_footer. You can use action “in_admin_footer”
// define the in_admin_footer callback
function action_in_admin_footer() {
global $pagenow, $current_page, $post;
//$current_page->post_type === 'shop_order'
if( $pagenow == 'post.php' && !empty( $_GET['action'] ) && $_GET['action'] == 'edit' && $post->post_type == 'shop_order' ) {
// make action magic happen here...
}
};
// add the action
add_action( 'in_admin_footer', 'action_in_admin_footer' );