• Resolved yoyoma1974

    (@yoyoma1974)


    I see on the Orders page that the Bulk actions drop down does not have the options to change orders to Pending status. Is there any way I can do this?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi @yoyoma1974

    I see on the Orders page that the Bulk actions drop down does not have the options to change orders to Pending status. Is there any way I can do this?

    From what I understand, you’re trying to change your orders’ status to ‘Pending’ through the Bulk Actions feature in WooCommerce. You’re right, the drop-down menu of Bulk Actions on the Orders page doesn’t include this option.

    The Bulk Actions feature aims to streamline order management, but it doesn’t encompass all possible actions. The ‘Change status to pending’ action doesn’t appear in the Bulk Actions drop-down menu because the ‘Pending’ status typically applies to orders awaiting payment. Once the payment comes through, the order status should update automatically.

    If you need to manually switch the status of multiple orders to ‘Pending’, you can do so for each order individually. Here’s a step-by-step guide:

    1. Go to your WooCommerce Orders page.
    2. Click on the order number or ‘Edit‘ under the order.
    3. On the right side of the page, you’ll see ‘Order details‘ with a ‘Status‘ dropdown.
    4. Click on the dropdown and change the status to ‘Pending‘.
    5. Don’t forget to click the ‘Update‘ button to save the changes.

    ?? Find out more about Managing Orders Here

    While this approach might not be as speedy as a bulk action, it does offer the functionality you need.

    If you frequently need to bulk change orders to ‘Pending’ status, consider getting a developer to build a custom function for your site or use a plugin that offers this feature.

    ?? Just a heads up – while we’re always here to assist you, our scope of support doesn’t extend to custom development or design patterns, which includes troubleshooting or giving specific advice on using custom action hooks or filters.

    For custom solutions, our recommendation is to connect with Codeable.io, our trusted WooCommerce development partner. They’re experts in crafting custom solutions for WooCommerce and might be able to help you develop a custom solution for your problem. Check them out here: ?? https://woocommerce.com/codeable

    I hope this information helps. If you have any other questions or need further assistance, please don’t hesitate to ask.

    Thread Starter yoyoma1974

    (@yoyoma1974)

    Thanks, yes I know I can change to Pending manually but I will need to do this for many orders so I was hoping there was a way to do it in bulk.

    Tim

    Plugin Support Shameem R. a11n

    (@shameemreza)

    Hi @yoyoma1974

    Unfortunately, as my colleague mentioned, the default Bulk Actions feature in WooCommerce does not include the option to change the status of orders to “Pending” in bulk. This is because the “Pending” status is usually applied to orders that are awaiting payment and should update automatically once payment is received.

    However, if you frequently need to change the status of multiple orders to “Pending”, you might want to consider a custom solution. While our support scope doesn’t extend to custom development, we recommend that you seek help from:

    If you are comfortable with coding yourself and have questions, I would also recommend that you consider:

    Alternatively, numerous plugins are available that extend the functionality of WooCommerce and might offer the feature you’re looking for, such as WooCommerce Order Status Manager.

    I hope this provides some clarity on the matter. If you have any other questions, feel free to ask.

    Thread Starter yoyoma1974

    (@yoyoma1974)

    Actually I found code someone else was using to add a custom order status to the bulk actions, and I just replaced the custom status name with pending and it seems to work. For others that might need it here it is:

    add_filter( 'bulk_actions-edit-shop_order', 'misha_register_bulk_action' ); // edit-shop_order is the screen ID of the orders page
    
    function misha_register_bulk_action( $bulk_actions ) {
    
    	$bulk_actions[ 'pending' ] = 'Change status to pending'; // <option value="mark_awaiting_shipping">Change status to pending</option>
    	return $bulk_actions;
    
    }
    
    add_action( 'handle_bulk_actions-edit-shop_order', 'misha_bulk_process_custom_status', 20, 3 );
    
    function misha_bulk_process_custom_status( $redirect, $doaction, $object_ids ) {
    
    	if( 'pending' === $doaction ) {
    
    		// change status of every selected order
    		foreach ( $object_ids as $order_id ) {
    			$order = wc_get_order( $order_id );
    			$order->update_status( 'pending' );
    		}
    
    		// do not forget to add query args to URL because we will show notices later
    		$redirect = add_query_arg(
    			array(
    				'bulk_action' => 'pending',
    				'changed' => count( $object_ids ),
    			),
    			$redirect
    		);
    
    	}
    
    	return $redirect;
    
    }
    
    add_action( 'admin_notices', 'misha_custom_order_status_notices' );
    
    function misha_custom_order_status_notices() {
    
    	if( 
    		isset( $_REQUEST[ 'bulk_action' ] ) 
    		&& 'pending' == $_REQUEST[ 'bulk_action' ]
    	 	&& isset( $_REQUEST[ 'changed' ] )
    		&& $_REQUEST[ 'changed' ]
    	) {
    
    		// displaying the message
    		printf(
    			'<div id="message" class="updated notice is-dismissible"><p>' . _n( '%d order status changed.', '%d order statuses changed.', $_REQUEST[ 'changed' ] ) . '</p></div>',
    			$_REQUEST[ 'changed' ]
    		);
    		
    	}
    
    }
    Saif

    (@babylon1999)

    Hello @yoyoma1974,

    Thank you for sharing the solution with the community! ??

    I’ll go ahead and mark the thread as solved, feel free to open a new one if you have any other questions. :?)

    Cheers!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Orders – Bulk actions does not include change status to pending’ is closed to new replies.