سلام
همینطور که از عنوان مشخص شده، قرار هست برای کاربرانی که قبلا محصولی رو خرید کردهاند یک پیام در صفحه هر محصول نمایش بدیم
برای اینکار میبایست از فانکشن wc_customer_bought_product استفاده کرد.
کد ما به این صورت میشه
function itl_display_note_buyers() {
global $product;
$current_user = wp_get_current_user();
if ( wc_customer_bought_product( $current_user->email, $current_user->ID, $product->id ) ) {
_e( 'your message', 'text-domain' );
}