xxxxxxxxxx
wc_customer_bought_product( $customer_email, $user_id, $product_id );
xxxxxxxxxx
if ( !function_exists( 'wc_customer_bought_product' ) ) {
require_once '/includes/wc-user-functions.php';
}
// The customer email.
$customer_email = '';
// The user id.
$user_id = -1;
// The product id.
$product_id = -1;
// NOTICE! Understand what this does before running.
$result = wc_customer_bought_product($customer_email, $user_id, $product_id);
Copy