Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author ILLID

    (@mihail-barinov)

    Hello,

    Looks like I found the solution for you. 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 ( $products_array && ! empty( $products_array ) ) {
            foreach ( $products_array as $key => $product ) {
                if ( $product['price'] && ! is_user_logged_in() ) {
                    $products_array[$key]['price'] = '';
                }
            }
        }
        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

    Thread Starter arohonka

    (@arohonka)

    thanks for the quick reply, works like a charm.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Hide prices from logged out’ is closed to new replies.