{"id":296124,"date":"2026-07-10T13:00:12","date_gmt":"2026-07-10T13:00:12","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/wsh-hotel-booking-management\/"},"modified":"2026-08-30T21:29:40","modified_gmt":"2026-08-30T21:29:40","slug":"wsh-hotel","status":"publish","type":"plugin","link":"https:\/\/sah.wordpress.org\/plugins\/wsh-hotel\/","author":23473330,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.3.0","stable_tag":"1.3.0","tested":"7.1","requires":"6.2","requires_php":"8.0","requires_plugins":null,"header_name":"WebStyle Hotel Booking for WooCommerce","header_author":"CN WebStyle","header_description":"Simple room booking for WordPress and WooCommerce. Create room types, show availability and accept direct bookings and payment in WooCommerce.","assets_banners_color":"666f76","last_updated":"2026-08-30 21:29:40","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"","header_author_uri":"https:\/\/web-style.dk\/","rating":0,"author_block_rating":0,"active_installs":0,"downloads":232,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.1.53":{"tag":"1.1.53","author":"cnwebstyle","date":"2026-07-10 16:49:40","revision":3603203},"1.2.0":{"tag":"1.2.0","author":"cnwebstyle","date":"2026-08-05 00:36:08","revision":3634748},"1.2.1":{"tag":"1.2.1","author":"cnwebstyle","date":"2026-08-05 01:10:08","revision":3634753},"1.3.0":{"tag":"1.3.0","author":"cnwebstyle","date":"2026-08-30 21:29:40","revision":3673147}},"upgrade_notice":[],"ratings":[],"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":3634748,"resolution":"128x128","location":"assets","locale":"","width":128,"height":128},"icon-256x256.png":{"filename":"icon-256x256.png","revision":3634748,"resolution":"256x256","location":"assets","locale":"","width":320,"height":320}},"assets_banners":{"banner-1544x500.jpg":{"filename":"banner-1544x500.jpg","revision":3634748,"resolution":"1544x500","location":"assets","locale":"","width":1544,"height":500},"banner-772x250.jpg":{"filename":"banner-772x250.jpg","revision":3634748,"resolution":"772x250","location":"assets","locale":"","width":772,"height":250}},"assets_blueprints":{"blueprint.json":{"filename":"blueprint.json","revision":3673147,"resolution":false,"location":"assets","locale":"","contents":"{\"$schema\":\"https:\\\/\\\/playground.wordpress.net\\\/blueprint-schema.json\",\"landingPage\":\"\\\/wp-admin\\\/admin.php?page=cnwshotel-dashboard\",\"preferredVersions\":{\"php\":\"8.3\",\"wp\":\"latest\"},\"phpExtensionBundles\":[\"kitchen-sink\"],\"features\":{\"networking\":true},\"steps\":[{\"step\":\"login\",\"username\":\"admin\",\"password\":\"password\"},{\"step\":\"installPlugin\",\"pluginData\":{\"resource\":\"wordpress.org\\\/plugins\",\"slug\":\"woocommerce\"},\"options\":{\"activate\":true}},{\"step\":\"installPlugin\",\"pluginData\":{\"resource\":\"wordpress.org\\\/plugins\",\"slug\":\"wsh-hotel\"},\"options\":{\"activate\":true}},{\"step\":\"runPHP\",\"code\":\"<?php\\nrequire '\\\/wordpress\\\/wp-load.php';\\n\\nif ( ! class_exists( 'WooCommerce' ) || ! class_exists( 'CNWSHOTEL_Installer' ) ) {\\n\\treturn;\\n}\\n\\nCNWSHOTEL_Installer::activate();\\n\\nif ( class_exists( 'CNWSHOTEL_Room_CPT' ) ) {\\n\\t$cnwshotel_demo_cpt = new CNWSHOTEL_Room_CPT();\\n\\t$cnwshotel_demo_cpt->register_cpt();\\n}\\n\\nif ( defined( 'WC_ABSPATH' ) && ! class_exists( 'WC_Install' ) ) {\\n\\tinclude_once WC_ABSPATH . 'includes\\\/class-wc-install.php';\\n}\\n\\nif ( class_exists( 'WC_Install' ) ) {\\n\\tWC_Install::create_pages();\\n}\\n\\nupdate_option( 'blogname', 'WebStyle Hotel Demo' );\\nupdate_option( 'blogdescription', 'Try the complete Free direct-booking flow' );\\nupdate_option( 'timezone_string', 'Europe\\\/Copenhagen' );\\nupdate_option( 'permalink_structure', '\\\/%postname%\\\/' );\\nupdate_option( 'woocommerce_currency', 'DKK' );\\nupdate_option( 'woocommerce_default_country', 'DK' );\\nupdate_option( 'cnwshotel_direct_checkout', 1 );\\nupdate_option( 'cnwshotel_children_search_enabled', 1 );\\nupdate_option( 'cnwshotel_extra_service_enabled', 1 );\\nupdate_option( 'cnwshotel_extra_service_name', 'Breakfast' );\\nupdate_option( 'cnwshotel_extra_service_price', '125.00' );\\nupdate_option( 'cnwshotel_tourist_tax_enabled', 1 );\\nupdate_option( 'cnwshotel_tourist_tax_name', 'Tourist tax' );\\nupdate_option( 'cnwshotel_tourist_tax_amount', '15.00' );\\n\\n$cnwshotel_demo_cod = (array) get_option( 'woocommerce_cod_settings', array() );\\n$cnwshotel_demo_cod['enabled'] = 'yes';\\n$cnwshotel_demo_cod['title']   = 'Pay at the property (demo)';\\nupdate_option( 'woocommerce_cod_settings', $cnwshotel_demo_cod );\\n\\n$cnwshotel_demo_page = get_page_by_path( 'room', OBJECT, 'page' );\\n\\nif ( ! $cnwshotel_demo_page ) {\\n\\t$cnwshotel_demo_page_id = wp_insert_post(\\n\\t\\tarray(\\n\\t\\t\\t'post_title'   => 'Book a demo stay',\\n\\t\\t\\t'post_name'    => 'room',\\n\\t\\t\\t'post_type'    => 'page',\\n\\t\\t\\t'post_status'  => 'publish',\\n\\t\\t\\t'post_content' => \\\"<!-- wp:heading {\\\\\\\"level\\\\\\\":1} --><h1 class=\\\\\\\"wp-block-heading\\\\\\\">Book a demo stay<\\\/h1><!-- \\\/wp:heading -->\\\\n<!-- wp:paragraph --><p>Choose dates and guests to test availability, room selection and the WooCommerce checkout flow. This temporary demo contains fictional rooms and guest data.<\\\/p><!-- \\\/wp:paragraph -->\\\\n[cnwshotel_search]\\\\n\\\\n[cnwshotel_room_results]\\\",\\n\\t\\t)\\n\\t);\\n} else {\\n\\t$cnwshotel_demo_page_id = absint( $cnwshotel_demo_page->ID );\\n}\\n\\nupdate_option( 'cnwshotel_booking_page_id', $cnwshotel_demo_page_id );\\n\\n$cnwshotel_demo_rooms = array(\\n\\tarray(\\n\\t\\t'name'        => 'Standard Double Room',\\n\\t\\t'intro'       => 'A practical double room for one or two guests, with a private bathroom and workspace.',\\n\\t\\t'size'        => 18,\\n\\t\\t'capacity'    => 2,\\n\\t\\t'price'       => 895,\\n\\t\\t'unit_numbers' => array( '101', '102', '103' ),\\n\\t),\\n\\tarray(\\n\\t\\t'name'        => 'Family Room',\\n\\t\\t'intro'       => 'A flexible family room with space for up to four guests.',\\n\\t\\t'size'        => 28,\\n\\t\\t'capacity'    => 4,\\n\\t\\t'price'       => 1295,\\n\\t\\t'unit_numbers' => array( '201', '202' ),\\n\\t),\\n\\tarray(\\n\\t\\t'name'        => 'City Suite',\\n\\t\\t'intro'       => 'A spacious suite for two guests with a seating area and city view.',\\n\\t\\t'size'        => 35,\\n\\t\\t'capacity'    => 2,\\n\\t\\t'price'       => 1695,\\n\\t\\t'unit_numbers' => array( '301' ),\\n\\t),\\n);\\n\\n$cnwshotel_demo_created = array();\\n$cnwshotel_demo_rooms_table = $GLOBALS['wpdb']->prefix . 'cnwshotel_rooms';\\n$cnwshotel_demo_units_table = $GLOBALS['wpdb']->prefix . 'cnwshotel_room_units';\\n\\nforeach ( $cnwshotel_demo_rooms as $cnwshotel_demo_room ) {\\n\\t$cnwshotel_demo_existing_posts = get_posts(\\n\\t\\tarray(\\n\\t\\t\\t'post_type'      => 'cnwshotel_room',\\n\\t\\t\\t'post_status'    => 'any',\\n\\t\\t\\t'title'          => $cnwshotel_demo_room['name'],\\n\\t\\t\\t'posts_per_page' => 1,\\n\\t\\t)\\n\\t);\\n\\t$cnwshotel_demo_existing = ! empty( $cnwshotel_demo_existing_posts[0] ) ? $cnwshotel_demo_existing_posts[0] : null;\\n\\n\\tif ( $cnwshotel_demo_existing ) {\\n\\t\\t$cnwshotel_demo_post_id = absint( $cnwshotel_demo_existing->ID );\\n\\t} else {\\n\\t\\t$cnwshotel_demo_post_id = wp_insert_post(\\n\\t\\t\\tarray(\\n\\t\\t\\t\\t'post_title'   => $cnwshotel_demo_room['name'],\\n\\t\\t\\t\\t'post_type'    => 'cnwshotel_room',\\n\\t\\t\\t\\t'post_status'  => 'publish',\\n\\t\\t\\t\\t'post_excerpt' => $cnwshotel_demo_room['intro'],\\n\\t\\t\\t)\\n\\t\\t);\\n\\t}\\n\\n\\tif ( ! $cnwshotel_demo_post_id || is_wp_error( $cnwshotel_demo_post_id ) ) {\\n\\t\\tcontinue;\\n\\t}\\n\\n\\tupdate_post_meta( $cnwshotel_demo_post_id, 'cnwshotel_room_intro', $cnwshotel_demo_room['intro'] );\\n\\tupdate_post_meta( $cnwshotel_demo_post_id, 'cnwshotel_room_size', $cnwshotel_demo_room['size'] );\\n\\n\\t$cnwshotel_demo_room_row = $GLOBALS['wpdb']->get_row(\\n\\t\\t$GLOBALS['wpdb']->prepare(\\n\\t\\t\\t'SELECT * FROM %i WHERE post_id = %d LIMIT 1',\\n\\t\\t\\t$cnwshotel_demo_rooms_table,\\n\\t\\t\\t$cnwshotel_demo_post_id\\n\\t\\t)\\n\\t);\\n\\n\\tif ( ! $cnwshotel_demo_room_row ) {\\n\\t\\t$GLOBALS['wpdb']->insert(\\n\\t\\t\\t$cnwshotel_demo_rooms_table,\\n\\t\\t\\tarray(\\n\\t\\t\\t\\t'post_id'         => $cnwshotel_demo_post_id,\\n\\t\\t\\t\\t'room_number'     => $cnwshotel_demo_room['name'],\\n\\t\\t\\t\\t'quantity'        => count( $cnwshotel_demo_room['unit_numbers'] ),\\n\\t\\t\\t\\t'max_persons'     => $cnwshotel_demo_room['capacity'],\\n\\t\\t\\t\\t'price'           => $cnwshotel_demo_room['price'],\\n\\t\\t\\t\\t'pricing_model'   => 'per_room',\\n\\t\\t\\t\\t'allocation_mode' => 'exclusive_units',\\n\\t\\t\\t),\\n\\t\\t\\tarray( '%d', '%s', '%d', '%d', '%f', '%s', '%s' )\\n\\t\\t);\\n\\t\\t$cnwshotel_demo_room_id = absint( $GLOBALS['wpdb']->insert_id );\\n\\t} else {\\n\\t\\t$cnwshotel_demo_room_id = absint( $cnwshotel_demo_room_row->id );\\n\\t}\\n\\n\\t$cnwshotel_demo_unit_ids = array();\\n\\n\\tforeach ( $cnwshotel_demo_room['unit_numbers'] as $cnwshotel_demo_unit_number ) {\\n\\t\\t$cnwshotel_demo_unit_id = absint(\\n\\t\\t\\t$GLOBALS['wpdb']->get_var(\\n\\t\\t\\t\\t$GLOBALS['wpdb']->prepare(\\n\\t\\t\\t\\t\\t'SELECT id FROM %i WHERE room_type_id = %d AND unit_number = %s LIMIT 1',\\n\\t\\t\\t\\t\\t$cnwshotel_demo_units_table,\\n\\t\\t\\t\\t\\t$cnwshotel_demo_room_id,\\n\\t\\t\\t\\t\\t$cnwshotel_demo_unit_number\\n\\t\\t\\t\\t)\\n\\t\\t\\t)\\n\\t\\t);\\n\\n\\t\\tif ( ! $cnwshotel_demo_unit_id ) {\\n\\t\\t\\t$GLOBALS['wpdb']->insert(\\n\\t\\t\\t\\t$cnwshotel_demo_units_table,\\n\\t\\t\\t\\tarray(\\n\\t\\t\\t\\t\\t'room_type_id' => $cnwshotel_demo_room_id,\\n\\t\\t\\t\\t\\t'unit_number'  => $cnwshotel_demo_unit_number,\\n\\t\\t\\t\\t\\t'floor'        => absint( substr( $cnwshotel_demo_unit_number, 0, 1 ) ),\\n\\t\\t\\t\\t\\t'status'       => 'active',\\n\\t\\t\\t\\t),\\n\\t\\t\\t\\tarray( '%d', '%s', '%d', '%s' )\\n\\t\\t\\t);\\n\\t\\t\\t$cnwshotel_demo_unit_id = absint( $GLOBALS['wpdb']->insert_id );\\n\\t\\t}\\n\\n\\t\\t$cnwshotel_demo_unit_ids[] = $cnwshotel_demo_unit_id;\\n\\t}\\n\\n\\t$cnwshotel_demo_product_id = absint( get_post_meta( $cnwshotel_demo_post_id, '_cnwshotel_demo_product_id', true ) );\\n\\n\\tif ( ! $cnwshotel_demo_product_id && class_exists( 'WC_Product_Simple' ) ) {\\n\\t\\t$cnwshotel_demo_product = new WC_Product_Simple();\\n\\t\\t$cnwshotel_demo_product->set_name( $cnwshotel_demo_room['name'] );\\n\\t\\t$cnwshotel_demo_product->set_status( 'publish' );\\n\\t\\t$cnwshotel_demo_product->set_catalog_visibility( 'hidden' );\\n\\t\\t$cnwshotel_demo_product->set_regular_price( (string) $cnwshotel_demo_room['price'] );\\n\\t\\t$cnwshotel_demo_product->set_price( (string) $cnwshotel_demo_room['price'] );\\n\\t\\t$cnwshotel_demo_product->set_virtual( true );\\n\\t\\t$cnwshotel_demo_product->set_sold_individually( true );\\n\\t\\t$cnwshotel_demo_product->set_manage_stock( false );\\n\\t\\t$cnwshotel_demo_product->set_stock_status( 'instock' );\\n\\t\\t$cnwshotel_demo_product_id = absint( $cnwshotel_demo_product->save() );\\n\\n\\t\\tif ( $cnwshotel_demo_product_id ) {\\n\\t\\t\\tupdate_post_meta( $cnwshotel_demo_product_id, '_cnwshotel_room_product', 'yes' );\\n\\t\\t\\tupdate_post_meta( $cnwshotel_demo_product_id, '_cnwshotel_room_post_id', $cnwshotel_demo_post_id );\\n\\t\\t\\tupdate_post_meta( $cnwshotel_demo_post_id, '_cnwshotel_demo_product_id', $cnwshotel_demo_product_id );\\n\\t\\t\\t$GLOBALS['wpdb']->update(\\n\\t\\t\\t\\t$cnwshotel_demo_rooms_table,\\n\\t\\t\\t\\tarray( 'woo_product_id' => $cnwshotel_demo_product_id ),\\n\\t\\t\\t\\tarray( 'id' => $cnwshotel_demo_room_id ),\\n\\t\\t\\t\\tarray( '%d' ),\\n\\t\\t\\t\\tarray( '%d' )\\n\\t\\t\\t);\\n\\t\\t}\\n\\t}\\n\\n\\t$cnwshotel_demo_created[ $cnwshotel_demo_room['name'] ] = array(\\n\\t\\t'room_id'  => $cnwshotel_demo_room_id,\\n\\t\\t'post_id'  => $cnwshotel_demo_post_id,\\n\\t\\t'unit_ids' => $cnwshotel_demo_unit_ids,\\n\\t);\\n}\\n\\n$cnwshotel_demo_bookings_table      = $GLOBALS['wpdb']->prefix . 'cnwshotel_bookings';\\n$cnwshotel_demo_booking_units_table = $GLOBALS['wpdb']->prefix . 'cnwshotel_booking_units';\\n$cnwshotel_demo_today               = wp_date( 'Y-m-d' );\\n\\n$cnwshotel_demo_bookings = array(\\n\\tarray(\\n\\t\\t'room_name'         => 'Standard Double Room',\\n\\t\\t'unit_index'        => 0,\\n\\t\\t'checkin'           => $cnwshotel_demo_today,\\n\\t\\t'checkout'          => wp_date( 'Y-m-d', strtotime( '+2 days' ) ),\\n\\t\\t'guests'            => 2,\\n\\t\\t'guest_name'        => 'Alex Walk-In',\\n\\t\\t'guest_email'       => 'walk-in@example.invalid',\\n\\t\\t'guest_phone'       => '+45 12 34 56 70',\\n\\t\\t'booking_note'      => 'Fictional walk-in reservation created for the WordPress.org preview.',\\n\\t\\t'booking_source'    => 'walk_in',\\n\\t\\t'external_reference' => '',\\n\\t\\t'checkin_status'    => 'pending',\\n\\t),\\n\\tarray(\\n\\t\\t'room_name'         => 'Standard Double Room',\\n\\t\\t'unit_index'        => 1,\\n\\t\\t'checkin'           => wp_date( 'Y-m-d', strtotime( '-2 days' ) ),\\n\\t\\t'checkout'          => $cnwshotel_demo_today,\\n\\t\\t'guests'            => 1,\\n\\t\\t'guest_name'        => 'Taylor Phone Guest',\\n\\t\\t'guest_email'       => 'phone@example.invalid',\\n\\t\\t'guest_phone'       => '+45 12 34 56 71',\\n\\t\\t'booking_note'      => 'Fictional phone reservation created for the WordPress.org preview.',\\n\\t\\t'booking_source'    => 'phone',\\n\\t\\t'external_reference' => '',\\n\\t\\t'checkin_status'    => 'checked_in',\\n\\t),\\n\\tarray(\\n\\t\\t'room_name'         => 'Family Room',\\n\\t\\t'unit_index'        => 0,\\n\\t\\t'checkin'           => wp_date( 'Y-m-d', strtotime( '-1 day' ) ),\\n\\t\\t'checkout'          => wp_date( 'Y-m-d', strtotime( '+1 day' ) ),\\n\\t\\t'guests'            => 3,\\n\\t\\t'guest_name'        => 'Morgan Channel Guest',\\n\\t\\t'guest_email'       => 'channel@example.invalid',\\n\\t\\t'guest_phone'       => '+45 12 34 56 72',\\n\\t\\t'booking_note'      => 'Fictional third-party channel reservation created for the WordPress.org preview.',\\n\\t\\t'booking_source'    => 'third_party',\\n\\t\\t'external_reference' => 'CHANNEL-DEMO-4812',\\n\\t\\t'checkin_status'    => 'checked_in',\\n\\t),\\n\\tarray(\\n\\t\\t'room_name'         => 'City Suite',\\n\\t\\t'unit_index'        => 0,\\n\\t\\t'checkin'           => wp_date( 'Y-m-d', strtotime( '+3 days' ) ),\\n\\t\\t'checkout'          => wp_date( 'Y-m-d', strtotime( '+5 days' ) ),\\n\\t\\t'guests'            => 2,\\n\\t\\t'guest_name'        => 'Jamie Website Guest',\\n\\t\\t'guest_email'       => 'website@example.invalid',\\n\\t\\t'guest_phone'       => '+45 12 34 56 73',\\n\\t\\t'booking_note'      => 'Fictional website reservation created for the WordPress.org preview.',\\n\\t\\t'booking_source'    => 'direct',\\n\\t\\t'external_reference' => '',\\n\\t\\t'checkin_status'    => 'pending',\\n\\t),\\n);\\n\\nforeach ( $cnwshotel_demo_bookings as $cnwshotel_demo_booking ) {\\n\\t$cnwshotel_demo_room_name  = $cnwshotel_demo_booking['room_name'];\\n\\t$cnwshotel_demo_unit_index = absint( $cnwshotel_demo_booking['unit_index'] );\\n\\n\\tif ( empty( $cnwshotel_demo_created[ $cnwshotel_demo_room_name ]['unit_ids'][ $cnwshotel_demo_unit_index ] ) ) {\\n\\t\\tcontinue;\\n\\t}\\n\\n\\t$cnwshotel_demo_existing_booking = absint(\\n\\t\\t$GLOBALS['wpdb']->get_var(\\n\\t\\t\\t$GLOBALS['wpdb']->prepare(\\n\\t\\t\\t\\t'SELECT id FROM %i WHERE guest_email = %s AND checkin = %s LIMIT 1',\\n\\t\\t\\t\\t$cnwshotel_demo_bookings_table,\\n\\t\\t\\t\\t$cnwshotel_demo_booking['guest_email'],\\n\\t\\t\\t\\t$cnwshotel_demo_booking['checkin']\\n\\t\\t\\t)\\n\\t\\t)\\n\\t);\\n\\n\\tif ( $cnwshotel_demo_existing_booking ) {\\n\\t\\tcontinue;\\n\\t}\\n\\n\\t$GLOBALS['wpdb']->insert(\\n\\t\\t$cnwshotel_demo_bookings_table,\\n\\t\\tarray(\\n\\t\\t\\t'room_id'            => $cnwshotel_demo_created[ $cnwshotel_demo_room_name ]['room_id'],\\n\\t\\t\\t'checkin'            => $cnwshotel_demo_booking['checkin'],\\n\\t\\t\\t'checkout'           => $cnwshotel_demo_booking['checkout'],\\n\\t\\t\\t'guests'             => $cnwshotel_demo_booking['guests'],\\n\\t\\t\\t'guests_real'        => $cnwshotel_demo_booking['guests'],\\n\\t\\t\\t'guests_paid'        => $cnwshotel_demo_booking['guests'],\\n\\t\\t\\t'guest_name'         => $cnwshotel_demo_booking['guest_name'],\\n\\t\\t\\t'guest_email'        => $cnwshotel_demo_booking['guest_email'],\\n\\t\\t\\t'guest_phone'        => $cnwshotel_demo_booking['guest_phone'],\\n\\t\\t\\t'booking_note'       => $cnwshotel_demo_booking['booking_note'],\\n\\t\\t\\t'booking_source'     => $cnwshotel_demo_booking['booking_source'],\\n\\t\\t\\t'external_reference' => $cnwshotel_demo_booking['external_reference'],\\n\\t\\t\\t'booking_status'     => 'confirmed',\\n\\t\\t\\t'checkin_status'     => $cnwshotel_demo_booking['checkin_status'],\\n\\t\\t\\t'created_at'         => current_time( 'mysql' ),\\n\\t\\t),\\n\\t\\tarray( '%d', '%s', '%s', '%d', '%d', '%d', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s' )\\n\\t);\\n\\t$cnwshotel_demo_booking_id = absint( $GLOBALS['wpdb']->insert_id );\\n\\n\\tif ( $cnwshotel_demo_booking_id ) {\\n\\t\\t$GLOBALS['wpdb']->insert(\\n\\t\\t\\t$cnwshotel_demo_booking_units_table,\\n\\t\\t\\tarray(\\n\\t\\t\\t\\t'booking_id' => $cnwshotel_demo_booking_id,\\n\\t\\t\\t\\t'unit_id'    => $cnwshotel_demo_created[ $cnwshotel_demo_room_name ]['unit_ids'][ $cnwshotel_demo_unit_index ],\\n\\t\\t\\t),\\n\\t\\t\\tarray( '%d', '%d' )\\n\\t\\t);\\n\\t}\\n}\\n\\n$cnwshotel_demo_seasonal_table = $GLOBALS['wpdb']->prefix . 'cnwshotel_seasonal_pricing';\\n\\nif ( isset( $cnwshotel_demo_created['City Suite'] ) ) {\\n\\t$GLOBALS['wpdb']->delete(\\n\\t\\t$cnwshotel_demo_seasonal_table,\\n\\t\\tarray(\\n\\t\\t\\t'room_id'       => $cnwshotel_demo_created['City Suite']['post_id'],\\n\\t\\t\\t'modifier_type' => 'fixed',\\n\\t\\t),\\n\\t\\tarray( '%d', '%s' )\\n\\t);\\n\\t$GLOBALS['wpdb']->insert(\\n\\t\\t$cnwshotel_demo_seasonal_table,\\n\\t\\tarray(\\n\\t\\t\\t'room_id'        => $cnwshotel_demo_created['City Suite']['post_id'],\\n\\t\\t\\t'date_start'     => wp_date( 'Y-m-d', strtotime( '+10 days' ) ),\\n\\t\\t\\t'date_end'       => wp_date( 'Y-m-d', strtotime( '+14 days' ) ),\\n\\t\\t\\t'modifier_type'  => 'fixed',\\n\\t\\t\\t'modifier_value' => 1895,\\n\\t\\t),\\n\\t\\tarray( '%d', '%s', '%s', '%s', '%f' )\\n\\t);\\n}\\n\\nflush_rewrite_rules( false );\\n\"}]}"}},"all_blocks":[],"tagged_versions":["1.1.53","1.2.0","1.2.1","1.3.0"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":3634748,"resolution":"1","location":"assets","locale":"","width":1200,"height":900},"screenshot-2.png":{"filename":"screenshot-2.png","revision":3634748,"resolution":"2","location":"assets","locale":"","width":1200,"height":900},"screenshot-3.png":{"filename":"screenshot-3.png","revision":3634748,"resolution":"3","location":"assets","locale":"","width":1200,"height":900},"screenshot-4.png":{"filename":"screenshot-4.png","revision":3634748,"resolution":"4","location":"assets","locale":"","width":1200,"height":900},"screenshot-5.png":{"filename":"screenshot-5.png","revision":3634748,"resolution":"5","location":"assets","locale":"","width":1200,"height":900},"screenshot-6.png":{"filename":"screenshot-6.png","revision":3634748,"resolution":"6","location":"assets","locale":"","width":1200,"height":900}},"screenshots":{"1":"Free operations dashboard with arrivals, departures, current stays, upcoming arrivals and quick actions.","2":"Booking calendar showing booked, available and blocked dates for the physical room inventory.","3":"Manual booking and reservation administration for website, phone, walk-in and external-channel bookings.","4":"Printable daily overview with arrival, departure and in-house guest lists.","5":"Frontend availability search and room cards with live availability.","6":"Dedicated single-room page with dates, guest count, price and booking action.","7":"WooCommerce checkout with accommodation dates and booking details attached to the order.","8":"Guided setup for creating the first bookable room and connecting the frontend booking page."}},"plugin_section":[],"plugin_tags":[13685,4486,722,6467,286],"plugin_category":[45],"plugin_contributors":[270884],"plugin_business_model":[],"class_list":["post-296124","plugin","type-plugin","status-publish","hentry","plugin_tags-accommodation","plugin_tags-hotel-booking","plugin_tags-reservation","plugin_tags-vacation-rental","plugin_tags-woocommerce","plugin_category-ecommerce","plugin_contributors-cnwebstyle","plugin_committers-cnwebstyle"],"banners":{"banner":"https:\/\/ps.w.org\/wsh-hotel\/assets\/banner-772x250.jpg?rev=3634748","banner_2x":"https:\/\/ps.w.org\/wsh-hotel\/assets\/banner-1544x500.jpg?rev=3634748","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/wsh-hotel\/assets\/icon-128x128.png?rev=3634748","icon_2x":"https:\/\/ps.w.org\/wsh-hotel\/assets\/icon-256x256.png?rev=3634748","generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/wsh-hotel\/assets\/screenshot-1.png?rev=3634748","caption":"Free operations dashboard with arrivals, departures, current stays, upcoming arrivals and quick actions."},{"src":"https:\/\/ps.w.org\/wsh-hotel\/assets\/screenshot-2.png?rev=3634748","caption":"Booking calendar showing booked, available and blocked dates for the physical room inventory."},{"src":"https:\/\/ps.w.org\/wsh-hotel\/assets\/screenshot-3.png?rev=3634748","caption":"Manual booking and reservation administration for website, phone, walk-in and external-channel bookings."},{"src":"https:\/\/ps.w.org\/wsh-hotel\/assets\/screenshot-4.png?rev=3634748","caption":"Printable daily overview with arrival, departure and in-house guest lists."},{"src":"https:\/\/ps.w.org\/wsh-hotel\/assets\/screenshot-5.png?rev=3634748","caption":"Frontend availability search and room cards with live availability."},{"src":"https:\/\/ps.w.org\/wsh-hotel\/assets\/screenshot-6.png?rev=3634748","caption":"Dedicated single-room page with dates, guest count, price and booking action."}],"raw_content":"<!--section=description-->\n<p>WebStyle Hotel Booking for WooCommerce gives independent hotels, guest houses, bed and breakfasts, apartments and other accommodation businesses a practical booking core inside WordPress.<\/p>\n\n<p>Start with Free and keep the same booking foundation as your property grows. Guests can search available rooms, open a room page and complete the reservation through WooCommerce. Staff can add walk-ins, phone bookings, email reservations and bookings received elsewhere, while the same physical room availability stays in one place.<\/p>\n\n<p>Free does not require a license key, does not expire and is not a limited trial. It is the core booking plugin used on its own and underneath WebStyle Hotel Booking Pro.<\/p>\n\n<h4>Accept direct bookings with WooCommerce<\/h4>\n\n<ul>\n<li>Create room types and individual room units<\/li>\n<li>Search by check-in, check-out, adults and children<\/li>\n<li>Show matching rooms with live physical availability<\/li>\n<li>Open dedicated room pages at the standard <code>\/rooms\/&lt;room-slug&gt;\/<\/code> URL<\/li>\n<li>Accept stays of up to 14 nights in Free<\/li>\n<li>Continue reservations through WooCommerce cart, checkout and payment<\/li>\n<li>Store hotel booking details with the WooCommerce order<\/li>\n<li>Temporarily hold selected rooms while checkout is in progress<\/li>\n<li>Use WooCommerce for payment gateways, taxes and order totals<\/li>\n<\/ul>\n\n<h4>Keep website, phone and walk-in bookings together<\/h4>\n\n<ul>\n<li>Add manual reservations for walk-ins, phone calls and email requests<\/li>\n<li>Register reservations received through external booking channels<\/li>\n<li>Save booking source and an external reference<\/li>\n<li>Block rooms for maintenance, private use or unavailable periods<\/li>\n<li>Prevent overlapping stays against the physical room inventory<\/li>\n<li>Search and filter reservations from WordPress admin<\/li>\n<\/ul>\n\n<h4>Run practical daily hotel operations<\/h4>\n\n<ul>\n<li>Dashboard with arrivals, departures, current stays and upcoming arrivals<\/li>\n<li>Booking calendar with booked, available and blocked dates<\/li>\n<li>Combined daily operations overview<\/li>\n<li>Printable arrival, departure and in-house guest lists<\/li>\n<li>Guest contact overview linked to booking orders<\/li>\n<li>Check-in and stay-status handling<\/li>\n<li>Manual booking workflow for reception and staff<\/li>\n<\/ul>\n\n<h4>Configure simple prices and stay charges<\/h4>\n\n<ul>\n<li>Base nightly price per room type<\/li>\n<li>One simple date-based price rule per room type in Free<\/li>\n<li>One fixed optional extra service per booking<\/li>\n<li>Simple tourist tax per guest per night<\/li>\n<li>WooCommerce remains responsible for checkout, taxes, payment and order totals<\/li>\n<\/ul>\n\n<h4>Quick setup<\/h4>\n\n<ul>\n<li>Guided setup wizard<\/li>\n<li>Native WordPress room content<\/li>\n<li>Room search, search-result and room-overview shortcodes<\/li>\n<li>Room gallery support and a built-in placeholder image<\/li>\n<li>Dedicated Hotel Booking admin area<\/li>\n<li>Translation-ready interface using the <code>wsh-hotel<\/code> text domain<\/li>\n<\/ul>\n\n<h4>Start Free. Add Pro without rebuilding your hotel<\/h4>\n\n<p>Free is the booking core. If you later add WebStyle Hotel Booking Pro, keep Free installed and active: Pro extends the same rooms, bookings and availability instead of replacing them with a second booking engine.<\/p>\n\n<p>Pro is delivered as a separate add-on outside WordPress.org. It adds deeper hotel operations such as advanced pricing, more flexible payment flows, expanded guest and folio tools, cleaning and breakfast workflows, automation and additional integrations.<\/p>\n\n<p>You can <a href=\"https:\/\/web-style.dk\/wordpress-plugin\/hotel-booking\/\">try WebStyle Hotel Booking Pro free for 30 days<\/a> before deciding whether the additional workflow is useful for your property.<\/p>\n\n<h4>Optional Channel Sync<\/h4>\n\n<p>For properties selling through supported third-party booking platforms, WebStyle Channel Sync is available as a separate add-on for the same Hotel core. Depending on the provider and setup, it can connect room mapping, reservation import, availability\/distribution synchronization and channel-specific workflows to the bookings already managed in WordPress.<\/p>\n\n<p>Channel Sync does not create a separate hotel calendar. Direct, manual and supported channel reservations continue to use the same Hotel booking and availability foundation.<\/p>\n\n<h4>Compatibility and release testing<\/h4>\n\n<p>WebStyle Hotel Booking 1.3.0 has been tested on a clean installation with WordPress 7.1 and WooCommerce 11.0.1. The release was also tested as an upgrade from the previous Free structure with existing room data.<\/p>\n\n<p>The 1.3.0 release specifically verifies that the standard <code>\/rooms\/<\/code> room URL works after a fresh installation and after upgrade without requiring the user to manually re-save WordPress permalinks.<\/p>\n\n<p>The plugin declares compatibility with WooCommerce High-Performance Order Storage and Cart\/Checkout Blocks. WooCommerce and the active payment gateway remain responsible for their own checkout and payment behavior.<\/p>\n\n<p>Before accepting real reservations, always complete a test booking, payment, email and cancellation flow with the site's active theme, tax configuration and payment gateway.<\/p>\n\n<h4>WooCommerce integration<\/h4>\n\n<p>WooCommerce is required for cart, checkout, payment and order handling.<\/p>\n\n<p>The plugin stores reservation and availability data in plugin-owned WordPress database tables and links online bookings to WooCommerce orders. WooCommerce remains the source of truth for checkout, payment, taxes and order storage.<\/p>\n\n<h4>Data, privacy and uninstall behavior<\/h4>\n\n<p>Depending on the booking, the plugin may store guest contact details, booking notes, stay dates, room assignment, booking source, status and a linked WooCommerce order ID.<\/p>\n\n<p>The plugin registers data export and erasure callbacks with the WordPress privacy tools. Guest contact details and booking notes can be anonymized while non-personal reservation records are retained. WooCommerce handles its own order and payment data.<\/p>\n\n<p>When the plugin is uninstalled, plugin-owned database tables, settings and scheduled cleanup events are removed. User-created room posts and WooCommerce orders are preserved.<\/p>\n\n<h4>Bundled assets<\/h4>\n\n<p>All bundled images and visual assets are original WebStyle assets and are distributed with the plugin under the plugin license.<\/p>\n\n<h4>Shortcodes<\/h4>\n\n<ul>\n<li><code>[cnwshotel_search]<\/code> - availability search with dates and guest count<\/li>\n<li><code>[cnwshotel_room_results]<\/code> - matching room results after a search<\/li>\n<li><code>[cnwshotel_rooms]<\/code> - complete room overview grid<\/li>\n<\/ul>\n\n<!--section=installation-->\n<ol>\n<li>Install and activate WooCommerce.<\/li>\n<li>Install WebStyle Hotel Booking for WooCommerce from WordPress.org and activate it.<\/li>\n<li>Open <strong>Hotel Booking<\/strong> in WordPress admin.<\/li>\n<li>Run the setup wizard or create the first room manually.<\/li>\n<li>Create or select the booking page and add the required booking shortcode(s).<\/li>\n<li>Configure WooCommerce checkout, taxes and at least one payment method.<\/li>\n<li>Search for the first room from the frontend and open its room page.<\/li>\n<li>Complete a full test booking before accepting live reservations.<\/li>\n<\/ol>\n\n<p>You do not need to visit <strong>Settings &gt; Permalinks<\/strong> after installation. Version 1.3.0 manages the standard room rewrite structure when required.<\/p>\n\n<!--section=faq-->\n<dl>\n<dt id=\"do%20i%20need%20woocommerce%3F\"><h3>Do I need WooCommerce?<\/h3><\/dt>\n<dd><p>Yes. WooCommerce is required for cart, checkout, payment, taxes and order handling.<\/p><\/dd>\n<dt id=\"is%20free%20a%20trial%20or%20does%20it%20expire%3F\"><h3>Is Free a trial or does it expire?<\/h3><\/dt>\n<dd><p>No. Free is a functional booking core and does not expire. It does not require a paid license key to keep using the included Free features.<\/p><\/dd>\n<dt id=\"is%20the%20free%20plugin%20usable%20without%20pro%3F\"><h3>Is the Free plugin usable without Pro?<\/h3><\/dt>\n<dd><p>Yes. Free provides the core flow for rooms, availability, direct booking, manual reservations, WooCommerce checkout, booking administration, calendar and daily lists.<\/p><\/dd>\n<dt id=\"if%20i%20add%20pro%20later%2C%20should%20i%20remove%20free%3F\"><h3>If I add Pro later, should I remove Free?<\/h3><\/dt>\n<dd><p>No. Keep WebStyle Hotel Booking for WooCommerce installed and active. Pro is now an extension of the Free booking core and uses the same room, booking and availability foundation.<\/p><\/dd>\n<dt id=\"can%20i%20try%20pro%20before%20buying%20it%3F\"><h3>Can I try Pro before buying it?<\/h3><\/dt>\n<dd><p>Yes. WebStyle Hotel Booking Pro can be tested free for 30 days. Pro is a separate add-on and the Free plugin continues to provide the core booking engine.<\/p><\/dd>\n<dt id=\"what%20does%20pro%20add%3F\"><h3>What does Pro add?<\/h3><\/dt>\n<dd><p>Pro is intended for properties that need more operational depth, including advanced pricing and payment choices, expanded customer and folio workflows, cleaning and breakfast operations, automation and additional integrations.<\/p><\/dd>\n<dt id=\"what%20is%20channel%20sync%3F\"><h3>What is Channel Sync?<\/h3><\/dt>\n<dd><p>Channel Sync is an optional separate add-on for supported third-party booking platforms. It connects supported reservation and availability\/distribution workflows to the same Hotel core instead of maintaining a second hotel calendar.<\/p><\/dd>\n<dt id=\"can%20i%20create%20bookings%20received%20outside%20the%20website%3F\"><h3>Can I create bookings received outside the website?<\/h3><\/dt>\n<dd><p>Yes. Free includes manual bookings for walk-ins, phone calls, email requests and external booking channels. You can store the source and an external reference while using the same availability controls as direct website bookings.<\/p><\/dd>\n<dt id=\"can%20i%20block%20unavailable%20dates%3F\"><h3>Can I block unavailable dates?<\/h3><\/dt>\n<dd><p>Yes. You can create blocked dates for maintenance, private use or other periods when a room must not be sold.<\/p><\/dd>\n<dt id=\"can%20staff%20print%20arrival%20and%20departure%20lists%3F\"><h3>Can staff print arrival and departure lists?<\/h3><\/dt>\n<dd><p>Yes. Free includes a combined daily overview and separate printable lists for arrivals, departures and guests currently staying at the property.<\/p><\/dd>\n<dt id=\"how%20long%20can%20a%20free%20booking%20be%3F\"><h3>How long can a Free booking be?<\/h3><\/dt>\n<dd><p>A Free booking can contain a stay of up to 14 nights.<\/p><\/dd>\n<dt id=\"can%20guests%20pay%20online%3F\"><h3>Can guests pay online?<\/h3><\/dt>\n<dd><p>Yes. The booking continues through WooCommerce, so available payment methods depend on the payment gateways configured on the website.<\/p><\/dd>\n<dt id=\"does%20the%20plugin%20work%20when%20woocommerce%20prices%20are%20entered%20with%20or%20without%20tax%3F\"><h3>Does the plugin work when WooCommerce prices are entered with or without tax?<\/h3><\/dt>\n<dd><p>WooCommerce remains responsible for tax configuration and order totals. Test the site's actual tax and payment setup before going live, especially when using additional payment or pricing extensions.<\/p><\/dd>\n<dt id=\"is%20the%20plugin%20compatible%20with%20hpos%20and%20block%20checkout%3F\"><h3>Is the plugin compatible with HPOS and block checkout?<\/h3><\/dt>\n<dd><p>The plugin declares compatibility with WooCommerce High-Performance Order Storage and Cart\/Checkout Blocks. Always test the complete checkout flow with the active theme and payment gateways before going live.<\/p><\/dd>\n<dt id=\"can%20i%20translate%20the%20plugin%3F\"><h3>Can I translate the plugin?<\/h3><\/dt>\n<dd><p>Yes. User-facing plugin strings use the <code>wsh-hotel<\/code> text domain and are prepared for translation.<\/p><\/dd>\n<dt id=\"what%20happens%20to%20my%20data%20if%20i%20uninstall%20the%20plugin%3F\"><h3>What happens to my data if I uninstall the plugin?<\/h3><\/dt>\n<dd><p>Plugin-owned booking tables and settings are removed. User-created room posts and WooCommerce orders are preserved.<\/p><\/dd>\n<dt id=\"is%20there%20a%20live%20demo%3F\"><h3>Is there a live demo?<\/h3><\/dt>\n<dd><p>Yes. Use the <strong>Preview<\/strong> button on the WordPress.org plugin page to open a temporary browser-based demo. The preview uses fictional demo data and does not install anything on your website.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.3.0<\/h4>\n\n<ul>\n<li>Made Free the canonical booking core used independently and as the required foundation for WebStyle Hotel Booking Pro.<\/li>\n<li>Fixed the standard <code>\/rooms\/&lt;room-slug&gt;\/<\/code> routing lifecycle so fresh installations and upgrades do not require a manual permalink save before room pages work.<\/li>\n<li>Preserved existing room, booking and WooCommerce order relationships during the new Free-core architecture transition.<\/li>\n<li>Added a neutral local Hotel core API and extension hooks so add-ons can reuse room, booking and availability data without internal HTTP requests.<\/li>\n<li>Kept premium implementations outside the WordPress.org Free package while allowing Pro and other add-ons to extend the same core.<\/li>\n<li>Regenerated the translation template and standardized the public Hotel plugin naming.<\/li>\n<li>Verified the Free booking flow on WordPress 7.1 and WooCommerce 11.0.1, including fresh installation, room search, single-room routing, WooCommerce order creation and booked-date availability.<\/li>\n<\/ul>\n\n<h4>1.2.1<\/h4>\n\n<ul>\n<li>Added the guest name directly to the booking overview so staff can identify and check in guests without opening each booking.<\/li>\n<li>Added a WooCommerce order fallback for older website bookings where the guest name is not stored in the hotel booking row.<\/li>\n<\/ul>\n\n<h4>1.2.0<\/h4>\n\n<ul>\n<li>Updated the public product name to WebStyle Hotel Booking for WooCommerce.<\/li>\n<li>Added a stronger Free operating core for smaller hotels, guest houses and bed and breakfasts.<\/li>\n<li>Added manual walk-in, phone, email and external-channel reservations plus blocked dates.<\/li>\n<li>Added booking source and external-reference fields with server-side availability validation.<\/li>\n<li>Added a lightweight operations dashboard with clickable daily totals, arrivals, departures, current stays and upcoming arrivals.<\/li>\n<li>Added a combined printable daily overview plus separate arrival, departure and in-house guest lists.<\/li>\n<li>Added simple date pricing, one fixed extra service, simple tourist tax and customer overview.<\/li>\n<li>Added optional adult and child search as room-capacity matching.<\/li>\n<li>Added direct checkout, WooCommerce booking email details and temporary cart holds.<\/li>\n<li>Added a server-side 14-night Free stay limit and WordPress privacy exporter\/eraser integration.<\/li>\n<li>Added a WordPress.org Playground preview blueprint with fictional demo data.<\/li>\n<li>Declared WooCommerce HPOS and Cart\/Checkout Blocks compatibility.<\/li>\n<li>Removed referral-tracking parameters and retained the dedicated Hotel Booking admin menu.<\/li>\n<\/ul>\n\n<h4>1.1.53<\/h4>\n\n<ul>\n<li>Improved the room search, availability display and WooCommerce booking flow.<\/li>\n<\/ul>\n\n<p>Older release notes are available in <code>changelog.txt<\/code>.<\/p>","raw_excerpt":"Free hotel booking core for WooCommerce: room availability, direct bookings, manual reservations and practical daily hotel operations.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/sah.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/296124","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sah.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/sah.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/sah.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=296124"}],"author":[{"embeddable":true,"href":"https:\/\/sah.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/cnwebstyle"}],"wp:attachment":[{"href":"https:\/\/sah.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=296124"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/sah.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=296124"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/sah.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=296124"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/sah.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=296124"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/sah.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=296124"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/sah.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=296124"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}