How to remove bulk delete in WPCargo Shipment Container Addons in Frontend Manager Addons
Here’s how to remove the buttons bellow the filter see screenshot below .
remove_action( 'wpcsc_after_add_container_dashboard', 'wpcsc_buttons_dashboard_callback',10 ); <span style="font-family: Consolas, Monaco, monospace;">
To show only buttons by role
remove_action( 'wpcsc_after_add_container_dashboard', 'wpcsc_buttons_dashboard_callback',10 ); function custom_import_export_bulk_delete_dashboard_callback(){ $page_url = get_the_permalink( wpc_container_frontend_page() ); if( is_user_logged_in() ) { $user = wp_get_current_user(); $roles = ( array ) $user->roles; } ?><i class="fa fa-recycle text-white"></i> <!--?php echo wpc_scpt_import_export_container_label(); ?--> <!--?php if (in_array("administrator", $roles)){ ?--><button id="wpcsc_container_bulk-delete" class="btn btn-danger btn-sm"><i class="fa fa-trash text-white"></i> <!--?php _e( 'Bulk Delete', 'wpcargo-shipment-container' ) ?--></button> <?php } } add_action( 'wpcsc_after_add_container_dashboard', 'custom_import_export_bulk_delete_dashboard_callback',10 ); <pre> <span style="font-family: Consolas, Monaco, monospace;">