Hi there 👋
At the moment, there’s no default option for that in WooCommerce and setting that as the default would require quite a bit of additional coding. Please kindly note that this requires some custom coding – which goes beyond the scope of support we are able to provide in this forum.
However, I’m going to leave it open for a bit to see if anyone is able to chime in to help you out.
You can also visit the WooCommerce Facebook group or the #developers
channel of the WooCommerce Community Slack. We’re lucky to have a great community of open-source developers for WooCommerce, and many of our developers hang out there, as well.`
If you do require more help with the actual coding, we’d recommend you hire a developer who can take a look at this, quote you for their services and help you add this feature to your site. We’d recommend getting in touch with a web developer or one of the customization experts listed at https://woocommerce.com/customizations/.
Cheers.
There is no addon like that, that already exist ?
That’s a pretty easy feature
The plugins I encountered only have the functionalities to add a sold badge when a product has been completely sold out, but not when a user has purchased it before.
I’m sure that a WooCommerce developer from the link I provided previously could easily help you with that feature.
Hi @maxence1502,
As for the custom coding option, you could use/modify a code snippet I found on this website:
/* Already purchased this product */
add_action( 'woocommerce_after_shop_loop_item', 'wphelp_you_already_bought_this', 30 );
function wphelp_you_already_bought_this() {
global $product;
if ( ! is_user_logged_in() ) return;
$current_user = wp_get_current_user();
if ( wc_customer_bought_product( $current_user->user_email, $current_user->ID, $product->get_id() ) ) echo '<div class="user-bought">♥ Hello ' . $current_user->first_name . ', you already bought this! Are you interested on it again?</div>';
}
Just to mention, we also have the Buy Again for WooCommerce extension which adds a buy again section on the customer’s account page as well as a notification on the product page.
For more info on it’s features, be sure to check it’s documentation or create a presales ticket with us.
Hope this helps.
Thanks.
We haven’t heard back from you in a while, so I’m going to mark this as resolved – if you have any further questions, you can start a new thread.