WPML
Status
Waiting for author
Related plugin/theme
Soho Hotel
Topic tags
Compatibility

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:
    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:

    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 →