Skip to content

wcpos/wcpos-webtoffee-smart-coupons

Repository files navigation

WCPOS WebToffee Smart Coupons

WebToffee Smart Coupons compatibility extension for WCPOS.

Scope

This extension targets Smart Coupons for WooCommerce Coupons by WebToffee only. It intentionally uses the wcpos-webtoffee-smart-coupons slug because other plugins also use “Smart Coupons” naming.

Current compatibility layer:

  • scaffolds the WCPOS extension repository and release/test structure using the existing smart-coupons extension pattern;
  • detects WebToffee Smart Coupons premium store-credit support before registering integration behavior;
  • remains inert for sites without WebToffee Smart Coupons, sites with only the free/basic plugin, and sites where the store_credit coupon type is not registered;
  • documents the premium-source verification still required before implementing production balance mutation, restoration, or receipt label enrichment.

Production store-credit balance handling is intentionally blocked until WebToffee premium source or a local premium installation verifies the exact hooks, metadata, lookup-table semantics, and REST/HPOS behavior.

Premium verification required

Before implementing balance mutation, confirm and document:

  • where WebToffee premium registers the store_credit coupon discount type;
  • which class/function deducts store-credit balance after checkout or order creation;
  • which metadata stores current and original balance;
  • whether coupon amount represents current remaining balance;
  • how wt_sc_coupon_lookup.amount is updated;
  • whether REST-created WCPOS orders trigger native WebToffee deduction and restoration hooks;
  • whether wallet coupons (is_wt_gc_wallet_coupon) differ from gift/store-credit coupons.

Record findings in docs/webtoffee-premium-verification.md before enabling production behavior.

Development

composer install
pnpm install
pnpm exec wp-env start
pnpm test

PHP/WordPress tests should run through Docker/wp-env.

About

WebToffee Smart Coupons compatibility for WCPOS

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages