Docs

Buy Again

3 min readUpdated October 31, 2026

Buy again lets customers reorder in one click. The portal offers it in two places: a Buy again button on completed orders in the orders list, and an optional Buy again widget on the Dashboard that shows products from earlier orders with an Add to cart button.

The Buy again button in the orders list#

The button is on by default. To change it:

  1. Go to WooCommerce > Account Portal > General.
  2. In the Orders & empty pages row, tick or untick “Buy again” button on completed orders in the orders list.
  3. Click Save Settings.
Orders table where a Completed order has View and Buy again buttons and a Processing order has only View

What happens when a customer clicks it#

The button uses WooCommerce’s own Order again feature: WooCommerce puts the same products in the cart and opens the cart. WooCommerce runs its usual checks, so products that are out of stock or no longer for sale are left out with a notice.

WooCommerce already shows an Order again button at the bottom of a completed order’s own page. The portal’s button adds the same action to the orders list, so customers don’t have to open the order first.

When the button shows#

  • The order has a status that allows ordering again. By default that is Completed only, following WooCommerce’s woocommerce_valid_order_statuses_for_order_again filter.
  • The order has at least one item.
  • The order belongs to the logged-in customer.
  • Nothing else has already added an order-again action to that row.

The button is styled as an outlined secondary button, so the View button stays the main action. Its screen reader label is “Buy the items in order number again”.

To allow Buy again on more statuses, use WooCommerce’s filter in your child theme’s functions.php or a code snippets plugin. This also changes WooCommerce’s own Order again button:

add_filter( 'woocommerce_valid_order_statuses_for_order_again', function ( $statuses ) {
	$statuses[] = 'processing';
	return $statuses;
} );

The Buy again Dashboard widget#

The widget is off by default. To add it:

  1. Go to WooCommerce > Account Portal > Dashboard.
  2. Switch on the Buy again widget and drag it where you want it.
  3. In its settings, set Products to show (1 to 8, default 4).
  4. Click Save Settings.
Buy again widget on the Dashboard with four product cards, each with price and Add to cart button

The widget lists products from the customer’s latest 15 completed orders, newest first, one card per product with its image, name, price and your shop’s add to cart button. A product is only listed when it can be bought now: published, visible in the catalogue, purchasable and in stock. If none qualify, the widget does not show at all. The View all link opens the Orders page when Orders is in the menu.

Change the products with a filter#

wap_buy_again_products receives the list of WC_Product objects and the customer’s user ID. Return an empty array to hide the widget for that customer. This example leaves out one category:

add_filter( 'wap_buy_again_products', function ( $products, $user_id ) {
	return array_values( array_filter( $products, function ( $product ) {
		$id = $product->get_parent_id() ? $product->get_parent_id() : $product->get_id();
		return ! has_term( 'gift-cards', 'product_cat', $id );
	} ) );
}, 10, 2 );
Note

The widget always looks at Completed orders. The woocommerce_valid_order_statuses_for_order_again filter changes the button in the orders list, not the widget.

Share:

Was this helpful?