WPML

Overview of the Issue

When visiting a booking page that uses Soho Hotel theme, the accommodations and guests are displayed in all languages instead of the selected one.

Workaround

Please be sure to have a full backup of your site before proceeding.

  1. Open the /wp-content/plugins/sohohotel-booking/includes/functions/backend/general/shb-core-functions.php file.
  2. Look for line 10.
  3. Replace the following snippet:
    PHP
    function shb_get_all_ids($post_type) {
    
    	$ids = get_posts(array(
    	  'fields'          => 'ids',
    	  'posts_per_page'  => -1,
    		'post_type' => $post_type,
    		'orderby' => 'date',
    		'order' => 'ASC',
    	));
    
    	return $ids;
    
    }

    With:

    PHP
    function shb_get_all_ids($post_type) {
    
    	$ids = get_posts(array(
    	  'fields'          => 'ids',
    	  'posts_per_page'  => -1,
    		'post_type' => $post_type,
    		'orderby' => 'date',
    		'order' => 'ASC',
    		'suppress_filters' => false,
    	));
    
    	return $ids;
    
    }

All known issues

Need Help with This Issue?

Ask a support question and we’ll look into it with you.