Wallet SystemWallet System
Buy Now
View Demo
  • Getting Started

    • Introduction
    • Quick Start
    • Features
    • Installation
    • First-Time Setup
    • Admin Tour
  • Wallet Core

    • Core Wallet
    • Wallet Payment Gateway
    • Recharge / Top-up
    • Wallet Transfer
    • My Wallet Page
    • Shortcodes
  • Earn & Reward

    • Cashback Engine
    • Referral Program
    • Multilevel Referral
    • Daily Login Reward
    • Invite Friends
    • Deposit / Top-up Bonus
  • Spend & Payout

    • Checkout Discount
    • Checkout Restriction
    • Withdrawal
    • PayPal Payout
    • Stripe Payout
    • Refund to Wallet
    • Buy Now Pay Later
  • Identity & Mobile

    • KYC
    • QR Code Payments
  • Wallet Central

    • Overview
    • Endpoint & Routing
    • CTA Discovery
    • Home Dashboard
    • Add Funds
    • Withdraw
    • Withdrawals List
    • Send Money
    • QR Pay
    • Payment Requests
    • Refer & Earn
    • Transactions
    • Settings
    • KYC Flow
    • Architecture
    • Tweaks & Responsive
    • Security
    • Admin Controls
  • Admin Tools

    • Admin Settings (index)
    • Bulk Credit / Debit
    • Analytics Dashboard
  • Settings Tabs

    • General
    • Recharge
    • Checkout
    • Withdrawal
    • Payout (PayPal/Stripe)
    • KYC
    • Cashback
    • Referral
    • Multilevel
    • BNPL
    • QR Pay
    • Notifications
    • Wallet Central
    • Integrations
    • API Keys
  • Notifications

    • Email Notifications
    • SMS Notifications
  • Developer

    • REST API
    • Filters & Hooks
  • Help

    • Troubleshooting
    • FAQ
    • Glossary
Support
Buy Now
View Demo
  • Getting Started

    • Introduction
    • Quick Start
    • Features
    • Installation
    • First-Time Setup
    • Admin Tour
  • Wallet Core

    • Core Wallet
    • Wallet Payment Gateway
    • Recharge / Top-up
    • Wallet Transfer
    • My Wallet Page
    • Shortcodes
  • Earn & Reward

    • Cashback Engine
    • Referral Program
    • Multilevel Referral
    • Daily Login Reward
    • Invite Friends
    • Deposit / Top-up Bonus
  • Spend & Payout

    • Checkout Discount
    • Checkout Restriction
    • Withdrawal
    • PayPal Payout
    • Stripe Payout
    • Refund to Wallet
    • Buy Now Pay Later
  • Identity & Mobile

    • KYC
    • QR Code Payments
  • Wallet Central

    • Overview
    • Endpoint & Routing
    • CTA Discovery
    • Home Dashboard
    • Add Funds
    • Withdraw
    • Withdrawals List
    • Send Money
    • QR Pay
    • Payment Requests
    • Refer & Earn
    • Transactions
    • Settings
    • KYC Flow
    • Architecture
    • Tweaks & Responsive
    • Security
    • Admin Controls
  • Admin Tools

    • Admin Settings (index)
    • Bulk Credit / Debit
    • Analytics Dashboard
  • Settings Tabs

    • General
    • Recharge
    • Checkout
    • Withdrawal
    • Payout (PayPal/Stripe)
    • KYC
    • Cashback
    • Referral
    • Multilevel
    • BNPL
    • QR Pay
    • Notifications
    • Wallet Central
    • Integrations
    • API Keys
  • Notifications

    • Email Notifications
    • SMS Notifications
  • Developer

    • REST API
    • Filters & Hooks
  • Help

    • Troubleshooting
    • FAQ
    • Glossary
Support
  • Getting Started

    • Introduction
    • Quick Start — Wallet Live in 5 Minutes
    • Features
    • Installation
    • First-Time Setup
    • Admin Tour
  • Wallet Core

    • Core Wallet
    • Wallet Payment Gateway
    • Recharge / Top-up
    • Wallet Transfer
    • My Wallet Page
    • Shortcodes
  • Earn & Reward

    • Cashback Engine
    • Referral Program
    • Multilevel Referral
    • Daily Login Reward
    • Invite Friends
    • Deposit / Top-up Bonus
  • Spend & Payout

    • Checkout Discount
    • Checkout Restriction
    • Withdrawal
    • PayPal Payout
    • Stripe Payout
    • Refund to Wallet
    • Buy Now Pay Later (BNPL)
  • Identity & Mobile

    • KYC (Know Your Customer)
    • QR Code Payments
  • Wallet Central

    • Wallet Central Overview
    • Endpoint & Routing
    • CTA Discovery
    • Home Dashboard
    • Add Funds
    • Withdraw
    • Withdrawals List + Detail
    • Send Money
    • QR Pay
    • Payment Requests
    • Refer & Earn
    • Transactions
    • Settings (customer)
    • KYC Flow
    • Architecture
    • Tweaks & Responsive
    • Security
    • Admin Controls
  • Admin Tools

    • Admin Settings
    • Bulk Credit / Debit
    • Analytics Dashboard
  • Settings Tabs

    • General Settings
    • Recharge Settings
    • Checkout Settings
    • Withdrawal Settings
    • Payout Settings (PayPal + Stripe)
    • KYC Settings
    • Cashback Settings
    • Referral Settings
    • Multilevel Settings
    • BNPL Settings
    • QR Pay Settings
    • Notifications Settings
    • Wallet Central Settings
    • Third-Party Integrations
    • API Keys
  • Notifications

    • Email Notifications
    • SMS Notifications
  • Developer

    • REST API
    • Filters & Hooks
  • Help

    • Troubleshooting
    • FAQ
    • Glossary

Endpoint & Routing

Developer reference

This page documents the rewrite rules + router internals. Useful when adding custom views or debugging URL-resolution. Admins and store owners can skip — the URL structure works automatically.

How URLs map to views inside /wallet-central/.

Rewrite Rules

Registered on init by WKWP_Central_Endpoint::register_rewrite(). Four rules, top-priority:

^wallet-central/?$
  → index.php?wkwp_central=1

^wallet-central/([a-z0-9_-]+)/?$
  → index.php?wkwp_central=1&wcc=$1

^wallet-central/([a-z0-9_-]+)/([a-z0-9_-]+)/?$
  → index.php?wkwp_central=1&wcc=$1&wcc_sub=$2

^wallet-central/([a-z0-9_-]+)/([a-z0-9_-]+)/([0-9]+)/?$
  → index.php?wkwp_central=1&wcc=$1&wcc_sub=$2&wcc_id=$3

Auto-flushes once on activation via wkwp_central_rewrite_flushed_v3 option.

Query Vars

VarSourcePurpose
wkwp_centralflag"1" → endpoint render takes over
wccpath segment 1view slug
wcc_subpath segment 2sub-action (e.g. view, mode)
wcc_idpath segment 3numeric ID (e.g. withdrawal row id)

Whitelisted via query_vars filter so get_query_var() reads cleanly.

Allowed Views

home, transactions, send, withdraw,
withdrawals, withdrawal-detail, add-to-wallet,
requests, qr, referral, settings, kyc

Resolved by WKWP_Central_Router::resolve(). Unknown slugs fall back to home — no 404.

URL → View Examples

URLResolves to
/wallet-central/home
/wallet-central/transactions/transactions
/wallet-central/withdraw/withdraw
/wallet-central/withdrawals/withdrawals
/wallet-central/withdrawals/view/123/withdrawal-detail (special-case in router)
/wallet-central/qr/?mode=mineqr
/wallet-central/qr/?mode=scanqr
/wallet-central/foo/home (fallback)

Special-Case: withdrawal-detail

The router merges three URL segments into one view:

if ( 'withdrawals' === $raw && 'view' === $sub && $id > 0 ) {
    return 'withdrawal-detail';
}

Means /wallet-central/withdrawals/view/123/ resolves to the withdrawal-detail view with wcc_id = 123. The detail view reads the ID via get_query_var( 'wcc_id' ).

Building URLs Programmatically

Use the helper instead of hand-concatenating paths:

$home  = WKWP_Central_Router::url();                     // /wallet-central/
$txns  = WKWP_Central_Router::url( 'transactions' );     // /wallet-central/transactions/
$qrs   = WKWP_Central_Router::url( 'qr', [ 'mode' => 'scan' ] ); // /wallet-central/qr/?mode=scan
$wdraw = WKWP_Central_Endpoint::url( 'withdrawals/view/123' );    // /wallet-central/withdrawals/view/123/

Helpers honour the multisite-aware base URL via home_url().

Template Render

Endpoint hooks template_redirect priority 1. When wkwp_central=1 query var set:

  1. Run auth check — anon → wp_safe_redirect( wp_login_url( current_url ) )
  2. Resolve view via router
  3. Boot WKWP_Central_Renderer
  4. Output own minimal HTML document via templates/index.php + templates/chrome.php
  5. exit — bypasses theme entirely

Theme Bypass

The templates/index.php writes a complete <!doctype html> document — no wp_head(), no theme stylesheet. Just:

  • Wallet Central CSS/JS bundles via wp_print_styles() / wp_print_scripts() for the registered handles
  • Minimal favicon via wp_site_icon()
  • Body class wcc-body
  • Root mount <div class="wcc-root">…</div>

Themes are completely out of the way. Customizers, page builders, third-party header / footer hooks all skipped.

Cache Headers

HeaderValue
Cache-Controlno-store, no-cache, must-revalidate, max-age=0
Pragmano-cache
Expires0

Wallet UI is per-user and balance-sensitive. Page is never cached at the HTTP layer.

CDN / page-cache plugins should bypass the URL pattern /wallet-central/*. Same rule that applies to /my-account/*.

Multisite

Each blog gets its own /wallet-central/ path. Auth + balance read are per-blog (per-blog wallet tables). Cross-blog navigation is blocked — each blog is an independent wallet store.

Title Map

WKWP_Central_Router::titles() provides the i18n title for each view, used by:

  • <title> tag in the chrome
  • Tab strip in the side rail
  • Breadcrumbs
home              → Wallet
transactions      → Transactions
send              → Send money
withdraw          → Withdraw
withdrawals       → Withdrawal requests
withdrawal-detail → Withdrawal detail
add-to-wallet     → Add to wallet
requests          → Payment requests
qr                → QR Pay
referral          → Refer & earn
settings          → Settings
kyc               → KYC verification

All passed through WPML / Polylang string registry.

Hooks

HookTypeArgsWhen
wkwp_central_viewsfilter( array $views )extend allowed view list
wkwp_central_view_resolvefilter( string $resolved, string $raw )swap final view
wkwp_central_view_titlesfilter( array $titles )rename / translate titles
wkwp_central_endpoint_redirect_urlfilter( string $url )mutate the anon redirect target
wkwp_central_endpoint_send_headersaction()inject extra HTTP headers before render

Add a Custom View

// 1. Allow the slug
add_filter( 'wkwp_central_views', function( $views ) {
    $views[] = 'rewards';
    return $views;
} );

// 2. Title
add_filter( 'wkwp_central_view_titles', function( $titles ) {
    $titles['rewards'] = __( 'Rewards', 'mytheme' );
    return $titles;
} );

// 3. Render
add_action( 'wkwp_central_render_view', function( $view ) {
    if ( 'rewards' !== $view ) return;
    echo '<div class="wcc-h1">My rewards</div>';
} );

Now /wallet-central/rewards/ works.

Troubleshooting

ProblemFix
/wallet-central/ 404sFlush rewrite — Settings → Permalinks → Save
Sub-view always shows homeSlug not in Router::VIEWS; add via wkwp_central_views filter
Anon visit not redirectedTheme is intercepting template_redirect first; raise its priority above 1
Detail page shows the listRouter pattern requires withdrawals/view/{id} — confirm trailing slash or query string

Related

  • Architecture
  • Home Dashboard
  • Admin Controls
Prev
Wallet Central Overview
Next
CTA Discovery