Can Fluent Cart do This?
Only specific user can see spesific product (by category)
Ex:
User A can see only Product A & C. cannot see product B
User B can see only Product B & C. cannot see product A
.
Is it possible using fluent cart?
Probably using FCRM conditional display you can embed the products and control display by tag.
Jorge de los ReyesΒ Using custom css?
Zahidul FitriΒ no need. FCRM has a native conditional display feature (in Gutenberg editor)
You can use this filter to achieve this.
add_filter('fluent_cart/shop_query', function ($query, $params) {
if (is_admin()) {
return $query;
}
$currentUserId = get_current_user_id();
if($currentUserId){
if($currentUserId === 1){
//Post Ids to exclude
$query->whereNotIn('ID', [10]);
}else if($currentUserId === 2){
$query->whereNotIn('ID', [11]);
}
}
return $query;
}, 10, 2);
here post id means product id
Ripon SarkarΒ were to apply this..