
外掛標籤
開發者團隊
② 後台搜尋「ShopMobi – API Optimizer for WooCommerce」→ 直接安裝(推薦)
原文外掛簡介
Stop receiving 50+ fields when your app needs 3. ShopMobi – API Optimizer for WooCommerce gives your store GraphQL-like flexibility over REST — plus login, password reset, and Stripe payments out of the box.
Built for developers creating mobile apps, Flutter apps, React Native apps, or any headless WooCommerce frontend.
Field Filtering
Apply field filtering to any WooCommerce REST API response. No changes required on the server side — clients request only what they need.
Via request header (recommended for apps):
X-WC-Fields: id,name,price,images
Via query parameter:
?fields=id,name,price,images
Exclude specific fields:
X-WC-Except: meta_data,description or ?except_fields=meta_data
When both header and query parameter are provided, the header takes priority. The plugin applies filtering after WooCommerce builds the full response, so all existing WooCommerce hooks and permissions remain intact.
Custom REST Endpoints
The plugin registers the following custom endpoints under the shopmobi/v1 namespace:
Authentication
POST /wp-json/shopmobi/v1/users/login — Login with username and password
POST /wp-json/shopmobi/v1/users/register — Register a new customer account
POST /wp-json/shopmobi/v1/users/update-profile — Update first name, last name, and phone (requires login)
Password Reset
POST /wp-json/shopmobi/v1/users/reset-password/generate — Send a password reset link to the user’s email (WordPress native flow)
POST /wp-json/shopmobi/v1/users/reset-password/verify — Verify the reset key and set a new password
Store Information
GET /wp-json/shopmobi/v1/general-settings — Country, currency, and active payment gateways (public)
GET /wp-json/shopmobi/v1/store-location — Store address and location (requires login)
GET /wp-json/shopmobi/v1/payment-gateways — Available payment gateways
Payments
POST /wp-json/shopmobi/v1/stripe-payment — Create a Stripe PaymentIntent and EphemeralKey for mobile checkout (requires login)
Product Variation Enhancement
Variation responses are enriched automatically. Raw variation IDs in product responses are replaced with full objects including:
Pricing (regular price, sale price, on_sale flag)
SKU and stock quantity
Stock status
Attributes with labels and slugs
Variation image URL
Third-Party Services
This plugin optionally integrates with Stripe (https://stripe.com) for payment processing. The Stripe integration is inactive until you provide API keys under WooCommerce > API Optimizer.
When the /shopmobi/v1/stripe-payment endpoint is called, payment data (amount, currency, Stripe customer ID) is sent directly to Stripe’s servers. No payment data passes through ShopMobi or any other third party.
Stripe Privacy Policy: https://stripe.com/privacy
Stripe Terms of Service: https://stripe.com/legal
Your Stripe API keys are stored in your WordPress database and are never shared with the plugin author.
Privacy Policy
This plugin stores data in your own WordPress database only:
Stripe Customer IDs (stripe_cust_id user meta) — created when a user makes a Stripe payment. Stored locally and shared only with Stripe to identify returning customers.
Password Reset Keys — handled entirely by WordPress core (get_password_reset_key() / reset_password()). No custom data is stored in user meta by this plugin.
This plugin does not track users, send analytics, or transmit any personal data to ShopMobi or any third party, except for payment data sent directly to Stripe when the Stripe endpoint is used.
For Stripe’s data handling practices, see https://stripe.com/privacy.
