📜  wcfm 过滤器供应商仪表板小部件 - PHP 代码示例

📅  最后修改于: 2022-03-11 14:53:57.590000             🧑  作者: Mango

代码示例1
add_filter( 'before_wcmp_dashboard_widget', 'filter_before_wcmp_dashboard_widget', 10, 1 );
function filter_before_wcmp_dashboard_widget( $vendor_dashboard_widget ) {
    unset($vendor_dashboard_widget['full']['wcmp_vendor_stats_reports']); //remove Vendor Stats and Reports widget
    unset($vendor_dashboard_widget['side']['wcmp_vendor_transaction_details']); //remove Transaction Details widget
    unset($vendor_dashboard_widget['side']['wcmp_vendor_product_stats']);  //remove Product Stats widget
    unset($vendor_dashboard_widget['side']['wcmp_vendor_products_cust_qna']);  //remove Customer Questions widget
    unset($vendor_dashboard_widget['normal']['wcmp_vendor_visitors_map']);  //remove Visitors Map widget
    unset($vendor_dashboard_widget['normal']['wcmp_vendor_pending_shipping']);  //remove Pending Shipping widget
    unset($vendor_dashboard_widget['normal']['wcmp_vendor_product_sales_report']);  //remove Product Sales Report widget
    unset($vendor_dashboard_widget['normal']['wcmp_customer_reviews']);  //remove Customer Reviews widget
    return $vendor_dashboard_widget;
}