Hi there
first of all, I’d like to specify that, in another version of the plugin, we have an automatic system that emails users when one of the products in their wishlist is back in stock
You can read more about this in our landing page ??
Regarding your specific question, I think you could retrieve a list of items using a custom snippet of code that queries wishlist database directly
For example, consider the following snippet of code:
function yith_wcwl_users_by_product( $product_id ) {
$list = array();
try {
$data_store = WC_Data_Store::load( 'wishlist-item' );
} catch ( Exception $e ) {
return $list;
}
$items = $data_store->query(
array(
'product_id' => $product_id,
'user_id' => false,
'session_id' => false,
'wishlist_id' => 'all',
)
);
if ( empty( $items ) ) {
return $list;
}
foreach ( $items as $item ) {
/**
* Wishlist item
*
* @var $item YITH_WCWL_Wishlist_Item
*/
$user = $item->get_user();
if ( ! $user ) {
continue;
}
$list[] = $user->user_email;
}
return $list;
}
This function will return a list of email addresses of customers with a specific product in wishlist (it requests product id as only input)