Shop Module (Smart Shop)

Sell digital products with crypto balance, PayPal, Stripe or MetaMask through a WordPress custom-post-type shop

What the Shop Module Is

Smart Shop turns part of your WordPress site into a digital product store. Each product is a custom WordPress post under the wpcrypto_shop post type, with categories, tags, badges, stock and pricing. Orders go through the same checkout module the rest of the plugin uses, so customers can pay with crypto balance, PayPal, Stripe or an on-chain Web3 transfer. Fulfilment is gated by admin approval and the file/URL you upload to the product.

🛒 What ships in the box

  • Custom post type: wpcrypto_shop
  • Taxonomies: wpcrypto_shop_category and wpcrypto_shop_tag
  • Three archive templates: default, minimal, tall
  • Two shortcodes: [wpcrypto_shop] and [wpcrypto_shop_cart]
  • Eight product badges (see below)
  • Coupon support: percentage-discount coupons configured in General Settings
  • Orders flow through the same shared checkout as the rest of the plugin

Where to Find It

Three admin entries live under WP Crypto:

  • Smart Shop — module overview
  • All Products — the standard WordPress post list filtered to wpcrypto_shop
  • Add New Product — the standard WordPress new-post screen for the shop CPT

Categories and tags use the standard WordPress taxonomy screens, accessible from the product editor.

Creating a Product

  1. Open Add New Product. WP Crypto → Add New Product opens a familiar WordPress post editor scoped to the shop CPT.
  2. Fill the title, content and featured image. The featured image becomes the product card image on archive and single pages.
  3. Set price, stock and badges in the Smart Shop meta box (described in the next sections).
  4. Pick a category and tags from the standard WordPress taxonomy boxes.
  5. Upload the deliverable. Smart Shop stores a download URL/file reference that is released to the buyer after admin approval.
  6. Publish. The product appears in the shop archive immediately.

Product Badges

Each product can carry one or more visual badges. Toggle a badge in the product editor and it appears on the product card on the front-end. The full set:

Badge Rendered label
NewNEW
SaleSALE
Best sellerBESTSELLER
Limited editionLIMITED
Hot productHOT
Digital productDIGITAL
Pre-orderPRE-ORDER
Free shipping(internal flag, not rendered as a visible card badge)

Archive Templates

The shop archive (the page listing all products) supports three layouts. Pick one from the meta box on each product, or pass the template attribute to the shortcode:

Template Best for
defaultGeneral-purpose grid with full-height product cards
minimalCompact list for sites with many products or limited width
tallMagazine-style tall cards for visual products

The constant WPCRYPTO_SHOP_ALLOWED_TEMPLATES guards this list; any other value falls back to default.

Shortcodes

Shortcode Purpose
[wpcrypto_shop] Renders the product grid. Accepts an optional template attribute (default, minimal or tall) to switch the layout.
[wpcrypto_shop_cart] Renders the cart and the start-of-checkout button on any page you place it on.

Coupons

Smart Shop uses the percentage-discount coupons defined in WP Crypto → General Settings. Each coupon has a code and a percentage. At checkout the discount is applied to the cart subtotal and recorded on the order so receipts and refunds use the right total.

What coupons can and cannot do here

  • ✅ Percentage discount off the cart total
  • ❌ Fixed-amount discounts, "buy one get one", free-shipping coupons, per-product coupons, per-user usage caps, expiry windows and stacking rules are not built in — these would need custom code.

Cart, Checkout and Order Lifecycle

The cart lives in the buyer's browser and is synced to the server when they start checkout. The checkout flow itself is the shared one documented on the Checkout Module page.

A shop order has a deliberately simple lifecycle: it sits as pending right after checkout, and is marked completed once an admin approves it and the deliverable is released to the buyer. There are no intermediate "Processing", "Cancelled" or "Refunded" states — anything beyond pending/completed is custom workflow you would add yourself.

Fulfilment Flow

  1. Buyer pays. The order is created in pending state.
  2. Admin reviews the order under All Products → Orders.
  3. Admin clicks approve. The plugin marks the order completed and surfaces the deliverable on the buyer's confirmation page.
  4. The buyer can re-open the success page from the confirmation link they were given — see the Checkout Module documentation.

Payment Methods Supported

The shop checkout inherits whatever payment methods you have enabled in General Settings:

  • Crypto balance (the user's internal balance on your platform)
  • PayPal (sandbox or live)
  • Stripe (sandbox or live, all card brands plus Apple Pay / Google Pay)
  • Web3 / MetaMask (on-chain transfer to one of your configured deposit addresses)

Disable any gateway you do not want by emptying its credentials in General Settings; the checkout hides the gateway automatically.

Operator Tips

⚠️ Things worth knowing before launch

  • Approval is manual — there is no auto-fulfilment. Plan staffing accordingly or write a small custom plugin that auto-completes orders matching your criteria.
  • Stock is honour-based — the meta box tracks stock but does not aggressively lock the field across concurrent buyers. For high-volume drops, add your own locking.
  • The deliverable URL is private — only the buyer's confirmation page can render it. Do not paste the URL in the product description.
  • Crypto-balance refunds are manual — if you need to refund, credit the buyer's internal balance through the user-management screens.

Troubleshooting

The shortcode renders an empty page

You have no published products yet, or the template attribute is misspelled. Check that at least one product is in the Published state and that you used default, minimal or tall.

Cart contents disappear between page loads

The cart lives in the browser's localStorage. Browsers in private/incognito mode discard it on close. Use a non-private window for end-to-end testing.

Buyer paid but did not get the deliverable

The order is still PENDING. Open the order, verify the payment, and approve — the success page then renders the deliverable. There is no automatic release.

Coupon does not apply at checkout

Confirm the coupon code exists in General Settings, and remember coupons are case-sensitive. Only percentage discounts are supported; "buy one get one" style codes will not apply.