Implement shop search and refactor
This commit is contained in:
@@ -7,6 +7,9 @@ class Wiaas_Admin_CL_Shop {
|
||||
add_action( 'admin_menu', array( __CLASS__, 'add_customers_page' ), 9 );
|
||||
}
|
||||
|
||||
/**
|
||||
* Add customer menu page for commercial lead
|
||||
*/
|
||||
public static function add_customers_page() {
|
||||
add_menu_page(
|
||||
__( 'Customers', 'wiaas' ),
|
||||
@@ -18,10 +21,9 @@ class Wiaas_Admin_CL_Shop {
|
||||
'66.0' );
|
||||
}
|
||||
|
||||
public static function output_orders() {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Render content for customer menu page
|
||||
*/
|
||||
public static function output_customers() {
|
||||
$organization_id = wiaas_get_current_user_organization_id();
|
||||
|
||||
@@ -52,13 +54,13 @@ class Wiaas_Admin_CL_Shop {
|
||||
$customer_id = absint($_POST['customer_order_type']['customer_id']);
|
||||
$order_type = sanitize_key($_POST['customer_order_type']['order_type']);
|
||||
|
||||
Wiaas_Shop_Data_Store::update_shop_customer_order_type(
|
||||
Wiaas_Shop::update_shop_customer_order_type(
|
||||
$organization_id,
|
||||
$customer_id,
|
||||
$order_type);
|
||||
}
|
||||
|
||||
$customers = Wiaas_Shop_Data_Store::get_shop_customers($organization_id);
|
||||
$customers = Wiaas_Shop::get_shop_customers($organization_id);
|
||||
|
||||
require 'views/html-admin-cl-customers-page.php';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user