Skip to main contentSkip to footer

Relevanssi updates through a proxy

If your website connects to the outside world with a proxy and you’re having trouble getting access to Relevanssi Premium updates, there may be a problem with the proxy. In this case, you’d have a perfectly valid API key set up, but WordPress still says your Relevanssi license is not valid.

This problem is usually related to server-side caching and sorts itself out in a couple of days, but if it’s a proxy problem, here’s a code snippet that may help:

add_filter( 'pre_http_send_through_proxy', function( $override, $uri, $check ) {
  if ( strpos( $uri, 'www.relevanssi.com' ) !== false ) {
    return true;
  }
  return $override;
}, 10, 3 );

 

Your account

Not logged in. Log in to see your license details.

Search

Popular Resources

WooCommerce: Popularity and price sorting

Many WooCommerce users use search sorting that allows users to sort by popularity or price. Unfortunately, while Relevanssi works fine with WooCommerce, those sorts do not work. Relevanssi doesn’t know about price or popularity, and the sorting assumes there’s a default WP search underneath. Relevanssi doesn’t do meta field sorting……as easily as the default WP search does. This function handles price, popularity and rating sorting: add_filter( ‘relevanssi_orderby’, ‘woocommerce_relevanssi_orderby’ ); function woocommerce_relevanssi_orderby( $orderby ) { if ( in_array( $orderby, array( ‘price’, ‘price-desc’ ), true ) ) { global $wp_query; $orderby = ‘meta_value_num’; $wp_query->query_vars[‘meta_key’] = ‘_price’; } if ( ‘price’ ===……$orderby ) { global $rlv_wc_order; $rlv_wc_order = ‘asc’; } if ( ‘date ID’ === $orderby ) { $orderby = ‘post_date’; } if ( ‘popularity’ === $orderby ) { global $wp_query, $rlv_wc_order; $orderby = ‘meta_value_num’; $rlv_wc_order = ‘desc’; $wp_query->query_vars[‘meta_key’] = ‘total_sales’; } return $orderby; } add_filter( ‘relevanssi_order’, ‘woocommerce_relevanssi_order’ ); function woocommerce_relevanssi_order(…

Related Posts:

Currently there are no related posts available.

Comment Section:

Leave a Reply

Your email address will not be published. Required fields are marked *

Fill out this field
Fill out this field
Please enter a valid email address.
You need to agree with the terms to proceed