| 开发者 | kwawingu |
|---|---|
| 更新时间 | 2026年11月23日 05:01 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
403 api_access_required, your synced tours keep showing, and wp-admin shows you one notice with the fix.
Your KwaWingu account also issues test keys (kw_pk_test_, kw_sk_test_). With them the plugin talks to a private sandbox of your account (sample tours, bookings that are never real, scripted test payments), so you can build and check the site before you switch to live keys.
What it does that a generic tour or booking plugin does not: it does not ask you to maintain a second copy of your tours in WordPress. Your catalog, prices, departures, seat availability, reviews, destinations and brand colours live in your KwaWingu operator account, where your OTA channels and payment gateway already are, and this plugin mirrors them into native WordPress content, reads prices and availability live on every page view, and hands the booking and the payment to your account (through your own payment gateway) so a seat sold on your site is the same seat sold everywhere else.
What you get:
Tour custom post type: real URLs, editable in WordPress, great for SEO. Removed tours are set to Draft, never deleted; once you edit a tour, sync stops overwriting your content..pot included).git clone https://github.com/KwaWingu/kw-wp-plugin into wp-content/plugins/kwawingu-tours (no build step is needed — the compiled block bundles are committed).403 api_access_required and the plugin tells you so in wp-admin. To try the plugin first, use the Test keys from the same page: they reach your private KwaWingu sandbox.kw_pk_…). Grant it site:read, profile:read, tours:read, availability:read, departures:read, calculator:read and bookings:read. If KwaWingu asks for an allowed origin, enter your WordPress site address (e.g. https://www.example.com).kw_sk_…) is only needed for the Inquiry Form and on-site booking. Grant it the inquiries:write, quotes:write, bookings:write and payments:write scopes.Yes. This plugin is a client for the KwaWingu Tours platform (https://tours.kwawingu.com) and has no standalone mode. You need an operator account, your operator slug and API keys: live keys need API access on the account, test keys reach its private sandbox. Without them the plugin activates but has nothing to show.
Yes, with the test keys from your KwaWingu dashboard (Settings, API keys, Test). The plugin then syncs the sandbox's sample tours and the on-site booking form books in the sandbox: no guest is emailed and no money moves. Pay with +255700000001 (paid at once), +255700000002 (fails) or +255700000003 (stays pending). A test-key sync never drafts your live tours; switch to live keys and sync again before you launch.
No. The plugin is free and GPL-licensed, and nothing in it is disabled by a plan, licence key, trial period or usage quota. It connects to the API access of your KwaWingu account, a paid part of that service, similar to how a payment-gateway plugin connects to your paid payment account. The only entitlement check is the one the KwaWingu API itself makes on every request; the plugin merely reports the API's answer (a 403) to the site owner and keeps your already-synced tours online.
Your synced tour and destination posts stay published, editable and indexable. Live prices, availability, search, the calculator and on-site booking pause with a visitor-safe "not available at the moment" message, and administrators see one notice in wp-admin linking to the dashboard page where API access is renewed (Settings, API keys). Nothing is deleted.
Yes. Keys are stored server-side and never sent to the browser. Interactive features (search, calculator, on-site booking) call a same-origin, nonce-protected WordPress REST endpoint that forwards to the KwaWingu API on the server. The private key is only used for booking writes, server-side.
Start with Redirect: zero setup, always-correct availability, payment handled by your hosted KwaWingu booking page. Use Widget to embed booking in a page, or On-site for a fully in-page booking and payment flow (needs your private key configured). Redirect and Widget need the hosted booking pages switched on in your KwaWingu account; the settings page warns you when they are off.
Yes. Blocks are theme-agnostic and server-rendered; classic themes can use the [kwawingu_*] shortcodes.
Yes. Add define( 'KWAWINGU_TOURS_SITE_BASE', 'https://staging.example' ); to wp-config.php — the Developer API root becomes KWAWINGU_TOURS_SITE_BASE/api/v1 and the hosted booking links and dashboard link follow it. KWAWINGU_TOURS_API_BASE can still be defined separately to override only the API root.
Tour content re-syncs automatically (hourly by default; configurable), via a "Sync now" button, and instantly when KwaWingu pushes a change to the Instant resync endpoint. Price, currency and sold-out state are not synced at all — they are read live from your account on every page view, with the last synced values as a fallback if the API is unreachable. Your manual edits to a tour are preserved on future syncs.
X-Forwarded-For, CF-Connecting-IP) are no longer read. Sites behind their own proxy can supply the real address with the kwawingu_tours_client_ip filter.quoteId of the live quote, and a price change while booking shows the new total instead of a generic error. Each attempt sends an Idempotency-Key, so a double click never books twice.brandPrimaryColor / brandAccentColor).kw_pk_test_, kw_sk_test_) reach your private KwaWingu sandbox; the settings page and the booking form say so and list the test payment numbers, and a test-key sync never drafts live tours.402 plan_required, publishable_key_read_only and test_mode_unsupported are reported to the site owner with the fix; notices link to Settings, API keys (or Billing) in your KwaWingu dashboard.kwawingu_tours_ prefix (options, transients, cron hooks, post meta, post types, admin-post actions, script/style handles, constants, JS globals); the old 3-character kwt_ prefix is gone. Brand colours are now attached through wp_add_inline_style() on the block stylesheet instead of a hand-printed <style> tag, and the JSON-LD block is emitted with wp_print_inline_script_tag().X-Portal-Token, issued once when the booking is created and validated by the KwaWingu API), in addition to the REST nonce. The deprecated ref+email booking lookup fallback is removed — without a token these routes answer 403 and point the guest at the "Manage your booking" link in their confirmation email. A payment intent is only created after a token-validated lookup of the same booking proves ownership.{hosted}/{operator}/destinations/{slug}): what the place is, highlights, best months, the official park tariff on file and your tours that go there. They used to open the bare local kwawingu_destination post, which for most catalogue entries was an empty page — so visitors left to search the web for the park instead. The sync keeps the API's slug (kwawingu_tours_slug); a destination synced before this release links to the local post until the next sync runs.kwawingu_tours_ prefix; API error messages are HTML-escaped when the exception is thrown; the Widget booking mode builds its <script> tag with core's wp_get_script_tag(); load_plugin_textdomain() is gone (WordPress loads language packs itself since 4.6); uninstall also removes the recorded API status and the live-price caches; the release zip no longer ships a vendor/ directory — the plugin autoloads its own classes and has no runtime dependencies.--kwt-primary: var( --kwt-primary, … ) on the block roots — a custom property referencing itself is a cycle, which the browser treats as invalid — so "Book & pay", "Estimate", "Send inquiry" and the Book button had no background. Brand defaults are now plain values that your Branding colours override.X-Portal-Token the API returns when the booking is created — sent as a header, so it never lands in access logs — instead of the ?email= lookup the API retires on 2027-07-01. The email lookup remains only as a fallback when no token was issued.paid/confirmed/completed, but the API's status is upper-case and a booking is CONFIRMED the moment it is created, before any money. The poll now reads the balance against the total (exact minor units) and stops once a payment has landed.imagedelivery.net/…/public, no file extension) and media_sideload_image() refuses a URL without one, so covers and galleries silently never reached the media library. Images are now downloaded and identified by their bytes./site) alongside tours.tours, the block read data; results now also link to the synced tour page on your site.[kwawingu_search], [kwawingu_calculator], [kwawingu_booking_form], [kwawingu_availability] and [kwawingu_inquiry] rendered forms without their scripts, because WordPress only loads a block's view script for the block.[kwawingu_booking_form id=…] and [kwawingu_availability id=…] ignored id (and slug); the form bound to the page it sat on.POST /quote needs the private key, and the response field is totalAmount.grandTotal in your currency.date, the API reads preferredDate).?tourSlug=) returned a 502 — a WordPress REST quirk with sanitize_title as a sanitize callback.KWAWINGU_TOURS_SITE_BASE constant to point a site at a staging/self-hosted KwaWingu; proxy failures are written to the debug log when WP_DEBUG is on.block.json (API v3, editor script, server render) and a committed editor bundle, so a block can no longer silently vanish from the inserter.POST /wp-json/kwawingu/v1/resync) lets KwaWingu tell your site to re-sync within seconds of you editing a tour. Copy the endpoint URL and signing secret from Settings → KwaWingu Tours → Instant resync into your KwaWingu dashboard.basePriceAdult field, so synced prices are no longer always zero. Tour currency, category, gallery and rating fields are now mapped correctly too.kwawingu/inquiry-form) and [kwawingu_inquiry] shortcode: visitors submit inquiries directly from your WordPress site; the operator gets an email notification and a Lead is captured in WordPress.POST /wp-json/kwawingu/v1/inquiry — nonce-guarded, rate-limited, forwards via private API key to your KwaWingu inbox.