P粉4821083102023-08-08 11:49:53
Only use the following lines to display bulk operations in the order list with "Processing" status.
add_filter( 'bulk_actions-edit-shop_order', 'bulk_actions_only_on_processing_orders_list', 100 ); function bulk_actions_only_on_processing_orders_list( $bulk_actions ) { if( ! (isset($_GET['post_status']) && $_GET['post_status'] === 'wc-processing') ) { $bulk_actions = array(); } return $bulk_actions; }
The code is in the child theme’s functions.php file or plugin file. Very careful