Skip to content

Instantly share code, notes, and snippets.

@alamgircsebd
Created September 23, 2021 15:37
Show Gist options
  • Save alamgircsebd/d6b4cb0fd7612a8494f46c443e4a2c51 to your computer and use it in GitHub Desktop.
Save alamgircsebd/d6b4cb0fd7612a8494f46c443e4a2c51 to your computer and use it in GitHub Desktop.
Remove delete option from Dokan vendor product listing
/**
* Remove delete option from dokan vendor product listing
* add this script on your theme functions.php file
*
* @param array $actions
*
* @return array $actions
*/
function remove_delete_option_dokan_product_row_actions( $actions ) {
unset( $actions['delete'] );
return $actions;
}
add_filter( 'dokan_product_row_actions', 'remove_delete_option_dokan_vendor_product_listing' );
add_filter( 'dokan_bulk_product_statuses', 'remove_delete_option_dokan_vendor_product_listing' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment