{"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-05T01:10:08","modified_gmt":"2026-08-05T01:10:08","slug":"wsh-hotel","status":"publish","type":"plugin","link":"https:\/\/hr.wordpress.org\/plugins\/wsh-hotel\/","author":23473330,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.2.1","stable_tag":"1.2.1","tested":"7.0.2","requires":"6.2","requires_php":"8.0","requires_plugins":null,"header_name":"WebStyle Hotel Booking for WooCommerce","header_author":"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-05 01:10:08","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":145,"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"},"1.2.0":{"tag":"1.2.0","author":"cnwebstyle","date":"2026-08-05 00:36:08"},"1.2.1":{"tag":"1.2.1","author":"cnwebstyle","date":"2026-08-05 01:10:08"}},"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":3634753,"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"],"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":"Daily operations dashboard with arrivals, departures, active stays and quick actions.","2":"Manual booking form and reservation overview for walk-ins, phone and external-channel bookings.","3":"Booking calendar showing occupied rooms, available dates and blocked periods.","4":"Printable daily operations overview with arrival, departure and in-house guest lists.","5":"Frontend availability search with matching room cards and prices.","6":"WooCommerce checkout with accommodation dates, guest details and stay charges.","7":"Guided setup wizard for creating the first bookable room type."}},"plugin_section":[],"plugin_tags":[13685,11565,4486,722,6467],"plugin_category":[45],"plugin_contributors":[270884],"plugin_business_model":[],"class_list":["post-296124","plugin","type-plugin","status-publish","hentry","plugin_tags-accommodation","plugin_tags-guest-house","plugin_tags-hotel-booking","plugin_tags-reservation","plugin_tags-vacation-rental","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":"Daily operations dashboard with arrivals, departures, active stays and quick actions."},{"src":"https:\/\/ps.w.org\/wsh-hotel\/assets\/screenshot-2.png?rev=3634748","caption":"Manual booking form and reservation overview for walk-ins, phone and external-channel bookings."},{"src":"https:\/\/ps.w.org\/wsh-hotel\/assets\/screenshot-3.png?rev=3634748","caption":"Booking calendar showing occupied rooms, available dates and blocked periods."},{"src":"https:\/\/ps.w.org\/wsh-hotel\/assets\/screenshot-4.png?rev=3634748","caption":"Printable daily operations 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 with matching room cards and prices."},{"src":"https:\/\/ps.w.org\/wsh-hotel\/assets\/screenshot-6.png?rev=3634748","caption":"WooCommerce checkout with accommodation dates, guest details and stay charges."}],"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 direct-booking system inside WordPress.<\/p>\n\n<p>Guests can search available rooms, choose their stay and continue through WooCommerce checkout. Staff can also register walk-ins, phone bookings, email bookings and reservations received through external channels, so the same room availability remains visible in one place.<\/p>\n\n<p>The Free version is designed to cover the daily booking workflow without requiring a license key or paid activation step.<\/p>\n\n<h4>Accept direct bookings<\/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 and live availability<\/li>\n<li>Accept stays of up to 14 nights<\/li>\n<li>Send reservations through WooCommerce checkout and payment<\/li>\n<li>Show booking details in WooCommerce orders and emails<\/li>\n<li>Temporarily hold selected rooms during checkout<\/li>\n<\/ul>\n\n<h4>Handle bookings from every sales route<\/h4>\n\n<ul>\n<li>Add walk-in, phone, email and external-channel reservations manually<\/li>\n<li>Save the booking source and an external reference<\/li>\n<li>Block rooms for maintenance, private use or unavailable dates<\/li>\n<li>Prevent overlapping reservations by checking physical room availability<\/li>\n<li>Review and filter bookings from WordPress admin<\/li>\n<\/ul>\n\n<h4>Run daily accommodation operations<\/h4>\n\n<ul>\n<li>Lightweight dashboard with arrivals, departures, current stays and upcoming arrivals<\/li>\n<li>Booking calendar with confirmed reservations and blocked dates<\/li>\n<li>Combined daily operations overview<\/li>\n<li>Separate printable arrival, departure and in-house guest lists<\/li>\n<li>Guest contact overview based on booking orders<\/li>\n<li>Check-in and stay-status handling<\/li>\n<\/ul>\n\n<h4>Configure prices and stay charges<\/h4>\n\n<ul>\n<li>Base price per room type<\/li>\n<li>One simple date-based price rule 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>Prices and payments handled through WooCommerce<\/li>\n<\/ul>\n\n<h4>Quick setup<\/h4>\n\n<ul>\n<li>Guided setup wizard<\/li>\n<li>Native WordPress Room Type content<\/li>\n<li>Room overview and search shortcodes<\/li>\n<li>Basic room gallery and room placeholder image<\/li>\n<li>Dedicated Hotel Booking admin menu<\/li>\n<li>Translation-ready interface using the <code>wsh-hotel<\/code> text domain<\/li>\n<\/ul>\n\n<h4>Compatibility<\/h4>\n\n<p>Release 1.2.0 is prepared for WordPress 7.0.2 and WooCommerce 11.0.0 testing. The plugin declares compatibility with WooCommerce High-Performance Order Storage and Cart\/Checkout Blocks.<\/p>\n\n<p>Before using any booking system on a live property, test the complete booking, payment, email and cancellation flow with the active theme and payment gateway.<\/p>\n\n<h4>Optional Pro add-on<\/h4>\n\n<p>The Free plugin remains usable as a complete direct-booking core.<\/p>\n\n<p>A separate Pro add-on is available for accommodation businesses that need more automation and operational depth, including multiple rate rules, advanced add-ons, expanded guest management and other professional hotel tools. Pro functionality is not hidden or locked inside the Free plugin.<\/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 responsible for checkout, payment 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 Type 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>Upload the plugin files to <code>\/wp-content\/plugins\/wsh-hotel\/<\/code>, or install the plugin through the WordPress Plugins screen.<\/li>\n<li>Activate WebStyle Hotel Booking for WooCommerce.<\/li>\n<li>Open <strong>Hotel Booking<\/strong> in WordPress admin.<\/li>\n<li>Run the setup wizard or create the first room type manually.<\/li>\n<li>Add the booking shortcodes to the selected booking page.<\/li>\n<li>Configure WooCommerce checkout and at least one payment method.<\/li>\n<li>Complete a full test booking before accepting live reservations.<\/li>\n<\/ol>\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 and order handling.<\/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=\"is%20the%20free%20plugin%20usable%20without%20pro%3F\"><h3>Is the Free plugin usable without Pro?<\/h3><\/dt>\n<dd><p>Yes. The Free version provides the complete core flow for room setup, availability, direct booking, manual reservations, checkout and daily booking administration.<\/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 Type 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. When the WordPress.org Preview button is enabled, it opens a temporary browser-based demo with WooCommerce, fictional rooms and sample reservations. Nothing is installed on your website.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\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>Prepared compatibility metadata for WordPress 7.0.2 and WooCommerce 11.0.0 testing.<\/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":"Manage direct accommodation bookings, room availability, manual reservations, guest stays and WooCommerce checkout from WordPress.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/hr.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/296124","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hr.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/hr.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/hr.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=296124"}],"author":[{"embeddable":true,"href":"https:\/\/hr.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/cnwebstyle"}],"wp:attachment":[{"href":"https:\/\/hr.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=296124"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/hr.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=296124"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/hr.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=296124"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/hr.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=296124"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/hr.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=296124"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/hr.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=296124"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}