Skip to content Skip to sidebar

Waiting for author

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;
    	
    }
    

Leave a Reply

Please stay on topic and be respectful to others. If you need help with issues not related to this post, use our Support Forum to start a chat or submit a ticket.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>