public function display_order_list($customer_id = 0) { ?> <div id="wc-crm-page"> <form id="wc_crm_customers_form" method="post"> <input type="hidden" name="page" value="<?php echo WC_CRM_TOKEN; ?> "> <?php $the_customer = new WC_CRM_Customer($customer_id); $orders = $the_customer->get_orders(); $order_list = new WC_CRM_Table_Customer_Orders($orders, true); $order_list->prepare_items(); $order_list->display(); ?> <script> jQuery('document').ready(function($){ var parentBody = window.parent.document.body; $('#place_new_call_popup > .media-modal', parentBody).unblock(); $('.crm_actions .select_order').click(function(){ var parentBody = window.parent.document.body; var id = $(this).attr('href'); $("#number_order_product", parentBody).val(id); $('#place_new_call_popup', parentBody).hide(); return false; }); }); </script> <style> #message, .tablenav, #adminmenuwrap, #screen-meta, #screen-meta-links, #adminmenuback, #wpfooter, #wpadminbar{ display: none !important; } html{ padding-top: 0 !important; } #wpbody-content{ padding: 0 !important; } #wpcontent{ margin: 0 !important; } #wc-crm-page{ margin: 1.5em !important; } #wc-crm-page > h2{display: none;} #wpcontent { padding-left: 0px; } .media-frame-title h1 { text-transform: capitalize; } </style> </form> </div> <?php }