Hi,
Please use following code snippet
add_filter( 'aws_search_pre_filter_products', 'my_aws_search_pre_filter_products' );
function my_aws_search_pre_filter_products( $products_array ) {
if ( ! is_user_logged_in() && $products_array && ! empty( $products_array ) ) {
foreach ( $products_array as $key => $product ) {
if ( $product['add_to_cart'] ) {
$products_array[$key]['add_to_cart']['quantity'] = 0;
$products_array[$key]['add_to_cart']['text'] = __( 'Read more', 'woocommerce' );
}
}
}
return $products_array;
}
You need to add it somewhere outside the plugins folder. For example, inside functions.php file of your theme or use some plugin for adding code snippets.
Also after adding this code you will need to go to the plugin settings page and click the ‘Clear cache’ button.
Regards