| 开发者 | australcode |
|---|---|
| 更新时间 | 2026年10月22日 05:27 |
| PHP版本: | 8.1 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPL-2.0-or-later |
| 版权网址: | 版权信息 |
acrwd/ folder to change its markup; Settings warns you when a copy falls behind a plugin update.[acrwd_balance], [acrwd_history], [acrwd_earn_message], [acrwd_redeem], [acrwd_earn_line] for a "You'll earn X points" line in custom cart or checkout summaries, and [acrwd_if_can_redeem] to show a note only to customers who can redeem) — place them anywhere, including Elementor, Bricks or Divi layouts.wp acrwd import yith WP-CLI command, both with a dry-run preview, to migrate customer balances when switching.wp acrwd recalc WP-CLI command, with a dry-run, that checks every wallet against its transaction history and repairs any that disagree. Useful after a database restore or a support script that touched the ledger directly.acrwd_* actions and filters to wire points into your own logic.australcode-points-rewards folder to /wp-content/plugins/, or install it from the Plugins screen.Yes. Australcode Points and Rewards extends WooCommerce and will show a notice if WooCommerce is not active.
Yes. It uses the WooCommerce order CRUD API and declares HPOS compatibility.
In dedicated custom tables (balances and an append-only transaction ledger), so reads stay fast as your store grows.
You set the redemption rate, a minimum number of points required to redeem, and the maximum percentage of a cart that can be paid with points.
Because the cap is measured on the cart before tax. Points come off the order like a discount on the pre-tax amount, so with a 100% cap a customer can cover the products but the tax is still due — on stores whose prices include tax, that is the tax share of the price. The Redemption settings show the cap as it applies, and the cart never offers more than it can take.
Yes. The redeem box is in the cart and at checkout — in the classic and in the block-based versions of both — and in the My Account rewards area. Points come straight off the order total, like a payment, and nothing generates a coupon code you then have to send, chase or clean up.
Yes. In the block-based cart and checkout the redeem field sits in the order summary, below the totals; pressing Enter applies the points without placing the order. In the classic cart it sits next to "Proceed to checkout", and on the classic checkout above the checkout form. Both versions also show a "You'll earn X points" line with the totals.
Never, by default. With a Pro license you can set an expiration window; points are then swept by a daily task.
Yes, and it is meant to. If a customer earns points, spends them, and the order is then cancelled or refunded, the points they already spent are taken back — which can leave the balance below zero. The plugin leaves it there instead of rounding up to zero, because the balance is an honest record of what the customer owes the programme, and quietly forgiving it would let anyone reset their debt by cancelling an order. They earn their way back up; redeeming stays unavailable while the balance is at or below zero.
Yes. The Rewards tab in My Account lists every movement, twenty per page, with pages to reach the rest. The ledger keeps every entry — nothing is trimmed or rolled up — so what a customer sees is the same record the shop sees.
No. Proportional adjustment applies to refunds issued from the moment you update onwards; orders you refunded before that are left exactly as they are, and no balance changes on update. If you want to settle an old case, adjust that customer by hand from the Customers screen — the change is recorded in the ledger like any other.
Yes. The plugin ships a dedicated YITH importer: an Import page in the admin and a wp acrwd import yith WP-CLI command, both with a dry-run preview. It reads your customers' existing balances and writes them into the plugin's ledger, so nobody loses their points when you switch.
wp acrwd recalc are all free; Pro adds automation (an earning-rules engine, bonus events, VIP tiers, campaigns, referrals and expiration).You mostly don't have to. The customer-facing surfaces inherit your theme: text color and fonts come from the surrounding page, and the hairlines and card backgrounds derive from that text color, so they follow a light or a dark theme on their own. The Appearance tab (Settings) picks the accent — the plugin's, your theme's or your own — the color scheme (follow the theme, or force light or dark on the cards), density and corner radius, without code.
To go further, set these CSS variables on .acfk.acrwd-scope, the class every rewards fragment carries. A rule in your theme wins over the Appearance tab:
.acfk.acrwd-scope { --acrwd-accent: #1e3a8a; --acrwd-on-accent: #fff; --acrwd-radius: 0px; }
--acrwd-accent — fill of the floating widget, the solid buttons and the progress bar (default: the plugin's green).--acrwd-on-accent — text on that fill. The Appearance tab derives it by contrast; if you set --acrwd-accent by hand, set this one too.--acrwd-meter — fill of the tier progress bar (defaults to the accent).--acrwd-gap — spacing between blocks (12, 16 or 24 px from the density setting).--acrwd-radius — corner radius of cards and fields (0, 10 or 16 px).--acrwd-fg — text color of the rewards surfaces. Unset means "inherit from the page", which is almost always what you want.--acrwd-muted — secondary text: the value under a balance, dates in the history.--acrwd-border — the hairlines around cards and between history rows.--acrwd-surface — the card background.--acrwd-widget-offset — distance of the floating widget from the bottom edge, added to the device's safe area.--acrwd-_…) are private and change between versions. To change the markup instead of the styling, copy a template from the plugin's templates/frontend/ folder into your theme's acrwd/ folder.
The full catalogue, with argument lists, is on the plugin's Developers screen (Australcode Points and Rewards → Developers). Hooks marked (Pro) fire only when the Pro version is installed; the rest are in the free version: Filters:
acrwd_earning_multiplier — ( int $points, int $user_id, WC_Order $order ) — stack an extra multiplier on top of the base and per-role amounts.acrwd_role_earning_multiplier — ( float $multiplier, int $user_id, string[] $roles ) — customise the per-role earning multiplier.acrwd_user_can_earn — ( bool $allowed, int $user_id ) — decide whether a customer earns points, after the "Roles that earn" setting.acrwd_user_can_redeem — ( bool $allowed, int $user_id ) — decide whether a customer can redeem points, after the "Roles that redeem" setting.acrwd_redemption_coupon_code — ( string $code ) — change the code of the virtual coupon used when points are redeemed as a coupon.acrwd_earning_bonus_points — ( int $bonus, int $user_id, WC_Order $order ) — add flat bonus points after every multiplier has been applied.acrwd_order_earned_points — ( int $fallback, WC_Order|int $order ) — read what an order earned (the ledger amount once awarded, 0 once reverted or for a guest order, otherwise a preview), to show the figure on your thank-you page. Accepts the order or its id.acrwd_estimate_multiplier — ( int $points, int $user_id ) — apply multipliers to an estimate shown before there is an order ("Earn X points" on the product page, "You'll earn X" in the cart and checkout).acrwd_earn_expires_at — ( ?string $expires_at, ?WC_Order $order, ?string $earned_at ) — the expiry date of a new lot of points, or null for never. $earned_at is the date the lot counts from (null = now; the YITH history import passes the original date). Without a listener, points never expire.acrwd_text — ( string $text, string $key, array $ctx ) — change a storefront text by key (the same keys the Appearance tab edits); acrwd_text_{$key} filters a single one.acrwd_widget_atts — ( array $atts, string $surface ) — change the resolved attributes of a storefront surface before its data loads.acrwd_widget_data — ( array $data, string $surface, array $atts ) — change the data a storefront surface is about to render.acrwd_wrapper_classes — ( string[] $classes, string $surface, array $atts ) — add or remove classes on the root element of a storefront surface.acrwd_widget_html — ( string $html, string $surface, array $atts, array $data ) — post-process the final HTML of a storefront surface; the result is escaped again.acrwd_locate_template — ( string $path, string $name ) — the path of a storefront template; a copy in your theme's acrwd/ folder wins by default.acrwd_account_endpoint — ( string $endpoint ) — change the My Account "Rewards" endpoint slug.acrwd_enqueue_frontend — ( bool $should ) — force-load the storefront CSS where the plugin cannot detect its own output, which happens with some page builders.acrwd_tier_label (Pro) — ( string $label, string $tier_id ) — supply the display label for a VIP tier if you render tiers yourself.acrwd_customers_csv_columns — ( array $columns ) — add columns to the Customers CSV export; each one is a header plus a callable that receives the balance and returns the cell.acrwd_admin_dashboard_panels — ( int $now_ts ) — print your own card in the Dashboard panel row.acrwd_points_credited — ( int $user_id, int $points, TransactionType $type, ?int $order_id, string $reason_code ) — fires after any movement of a balance (orders, bonuses, adjustments, imports, reversals); the points are signed.acrwd_points_earned — ( int $user_id, WC_Order $order ) — fires after an order's points are awarded.acrwd_before_render — ( string $surface, array $atts, array $data ) — print markup right before a storefront surface.acrwd_after_render — ( string $surface, array $atts, array $data ) — print markup right after a storefront surface.acrwd_points_adjusted — ( int $user_id, int $points ) — fires after a single manual adjustment on the Customers screen, or through the REST endpoint POST /wallet/adjust unless it is sent with notify=false; bulk actions and CSV imports do not fire it. The points are signed.acrwd_myaccount_after_summary — ( int $user_id, Balance $balance ) — fires in the My Account "Rewards" tab after the balance summary, so you can add your own panel.acrwd_tier_changed (Pro) — ( int $user_id, ?Tier $tier ) — fires when a customer's VIP tier changes; $tier is null when they drop below the lowest one.acrwd_email_points_expiring (Pro) — ( int $user_id, int $points, string $expires ) — fires per customer when the expiry reminder runs, to send your own notification.The free version keeps running and your points, ledger and history stay untouched — the Pro features switch off until you renew. A customer you blocked with Pro can still be unblocked from the Customers screen. Pro is one site: an annual subscription, or a one-time lifetime license that never expires. Refunds are handled by Freemius, our Merchant of Record, with a 14-day money-back guarantee.
Free users can ask questions in the WordPress.org support forum. A Pro license includes email support — write to info@australcode.io and we'll help you get your rewards program running.
[acrwd_if_can_redeem]…[/acrwd_if_can_redeem] shows its content only to customers who can redeem right now (logged in, a role that redeems, not blocked, and a balance that clears the redemption minimum — the same rule the cart applies) — for a "redeem your points in the cart" note in a header or a side cart built with a page builder. Guests and customers without enough points no longer see it.wp acrwd award-order <order-id> [--dry-run] awards the points an order should have earned, once, following the normal earning rules — for orders linked to an account before this update.{points_label} placeholder, and the plain-text versions carry the same content.[acrwd_earn_line] shortcode for the "You'll earn X points" line in cart and checkout summaries built with a page builder.wp acrwd import yith takes --mode=full|balances (full is the default; balances is the previous summary import) and --batch=<n>, shows progress and reports live lots and what expires in the next 30/60/90 days. It is resumable, also in the middle of a customer.wp acrwd import yith-settings [--dry-run] and an "Import YITH settings" button copy the YITH options that have an equivalent (earning and redemption rates, rounding, order statuses, limits, expiration, labels) and list the ones that do not.acrwd_earn_expires_at receives a third argument, $earned_at, the date a lot counts from.wp acrwd recalc rebuilds point balances from the transaction ledger, with --customer and --dry-run. Balances are kept as a running figure so reading them stays instant; if ledger rows are ever removed outside the plugin, this is what puts the two back in agreement.