Manage Store Credit coupons

Create, find and adjust Store Credit coupons under Marketing » Coupons.

Beka Rice Avatar

Written by

Last updated


Every Store Credit balance is a WooCommerce coupon with the Store credit discount type, so you manage it under Marketing » Coupons like any other coupon. This page covers creating one by hand, finding a customer’s coupons, seeing where credit was spent, and what happens to the balance when orders are edited, cancelled or refunded.

When you’d use this

  • Create credit for a customer without sending the Store Credit email.
  • Look up a customer’s balance, or see which orders used a coupon.
  • Return credit to a customer after a cancelled, refunded or edited order.
  • Cancel credit you no longer want a customer to use.
  • Answer a customer’s request to export or erase their data.

Create a Store Credit coupon by hand

  1. Go to Marketing » Coupons and click Add coupon.
  2. Enter or generate a coupon code.
  3. Under Coupon data » General, set Discount type to Store credit and enter the credit in Coupon amount. The Store Credit coupon options appear below. Only coupons with this discount type are treated as store credit. A coupon set to another type, such as Fixed cart discount, still applies its discount at checkout, but its balance isn’t reduced and its usage isn’t tracked. Changing the type later doesn’t correct orders already placed with it.
  4. Under Usage restriction, add the customer’s email to Allowed emails.
  5. Click Publish.
Store Credit: Create a Store Credit coupon by hand (the Coupon data box, General tab, showing the Include tax and Apply to shipping checkboxes)

Give each customer their own coupon, restricted to their email. Anyone with a code that isn’t restricted can spend its balance. A coupon created here doesn’t send the Store Credit email; to create and email one in a step, use Send store credit.

Store Credit coupon options

Store credit coupons get two extra checkboxes on the General tab. A new coupon starts with your Store credit settings; once you save it, it keeps its own values, so later changes to the settings don’t affect it.

  • Include tax: the coupon amount includes tax. See Include tax for the difference and the tax settings it needs. Hidden when your tax settings don’t allow it, unless the coupon already has it on.
  • Apply to shipping: leftover credit also discounts shipping. Hidden when you tick WooCommerce’s Allow free shipping, which takes its place.

WooCommerce’s Maximum spend doesn’t apply to Store Credit coupons. The other usage restrictions work as they do for any coupon.

Find a customer’s coupons

Go to Marketing » Coupons. Filter by the Store credit coupon type, and use Filter by customer or email to pick a customer or type an email address. A coupon belongs to a customer when their email is in its Allowed emails. The coupon’s Coupon amount is its remaining balance, and its description holds any note sent with it.

Store Credit: Find a customer's coupons (the filters and the list table)

Track how a coupon was used

Open the coupon. The Store credit usage box lists each order that used it, with the order number, date, status and Credit used, plus the coupon’s Initial amount and Total used. Failed orders are listed, but their credit isn’t counted in Total used. Cancelled and refunded orders aren’t listed, because their credit went back on the coupon.

How credit is restored

The coupon’s balance goes down as soon as the order is placed, before it’s paid. Store Credit puts credit back on the coupon when:

  • The order’s status changes to Cancelled or Refunded.
  • You remove the coupon from the order on the order screen.
  • You edit the order so that it needs less credit than was used.

A Failed order keeps its credit, because the customer can still pay it. To give the credit back, remove the coupon from the order, or cancel the order.

A partial refund doesn’t return credit, because the order’s status doesn’t change. To give back part of the credit, edit the coupon’s Coupon amount under Marketing » Coupons.

If you move a cancelled or refunded order back to another status, Store Credit removes its restored coupons from the order, since their credit is already back on the coupons. Apply them again on the order screen if the customer should still use them.

Edit orders that used credit

On an order that’s Pending payment or On hold, you can apply a Store Credit coupon with Apply coupon or remove one, like any coupon. The credit used and the coupon’s balance update to match. After changing items, quantities or taxes, click Recalculate so the totals and the credit used are right.

The order shows Store credit used in its totals, and shipping credit as a negative shipping line. For integrations such as an ERP, the WooCommerce REST API includes a store_credit field with the credit used on each order.

Exhausted and expired coupons

A coupon with no balance left stays in your coupons list until Delete after use moves it to the trash (see Delete after use). Avoid trashing used-up coupons by hand while their orders are still open, because a cancellation or refund puts credit back on them.

Expired coupons can’t be applied and don’t show in My Account or the cart and checkout list. To extend one, change its Coupon expiry date.

To cancel credit a customer hasn’t spent, move the coupon to the trash, or remove their email from Allowed emails. Orders that already used it keep their discount.

Subscriptions

Customers can use Store Credit on the first order of a WooCommerce Subscriptions subscription and on renewal orders they pay themselves. Store Credit isn’t a payment method, so it can’t pay automatic renewals; for that, see Get started with Account Funds.

Personal data requests

Store Credit adds "Store credit for WooCommerce coupon data" to WordPress’s personal data tools under Tools:

  • Export: every Store Credit coupon whose Allowed emails includes the customer’s email, with its code, balance and the email.
  • Erase: only when Remove personal data from orders on request is on under WooCommerce » Settings » Accounts & Privacy. Store Credit removes the email from each coupon, and permanently deletes a coupon that has no other allowed email. With the setting off, the coupons are kept and the erasure report says so.

Store Credit keeps customers’ emails on their coupons and the credit used on orders, in your own database.

If you click Sign up on the plugin’s newsletter prompt in your admin, your name, email address, site name and address, and WordPress, WooCommerce and PHP versions are sent to Kestrel’s email provider, Klaviyo. Nothing is sent unless you sign up.

Deleting the plugin keeps your coupons and orders. If your site’s wp-config.php sets WC_REMOVE_ALL_DATA to true, it also removes the Store Credit settings.

Common issues

The customer’s balance is lower than expected

Open the coupon and check Store credit usage. Credit is taken when an order is placed, so an unpaid, on-hold or failed order may be holding it. Cancel that order, or remove the coupon from it, to put the credit back.

A refund didn’t give the credit back

Only a full refund that changes the order to Refunded restores credit. After a partial refund, add the credit back by editing the coupon’s Coupon amount.

Coupons disappeared after a reactivated order

Moving an order out of Cancelled or Refunded removes its restored Store Credit coupons. Apply them again with Apply coupon on the order screen.

The order total is wrong after editing items

Click Recalculate on the order screen. Coupons can only be changed while the order is Pending payment or On hold.

A used-up coupon is gone from the list

Delete after use moved it to the trash. Look under Marketing » Coupons » Trash. Turn the setting off to keep used-up coupons.

The discount is applied twice with WebToffee Smart Coupons Premium

WebToffee Smart Coupons Premium uses the same Store credit coupon type, and applies its own discount to every coupon of that type, including the ones Store Credit creates. With both plugins active, the cart’s store credit discount is usually about double the coupon’s value, and the order screen may count the total discount twice. Store Credit shows a warning in your dashboard while WebToffee Smart Coupons Premium is active. The free version of WebToffee Smart Coupons doesn’t cause this.

Fix it in one of two ways:

  • Use Store Credit for all your store credit. Turn off WebToffee’s store credit features, or deactivate WebToffee Smart Coupons Premium. This is the simplest and most reliable fix.
  • Keep both plugins. Add the snippet below with a code snippets plugin, or to your child theme’s functions.php, to stop WebToffee discounting store credit coupons. Store Credit then handles every store credit coupon on your store, including any that WebToffee created.
/**
 * Store Credit + WebToffee Smart Coupons Premium:
 * stop WebToffee from applying a second discount to store credit coupons.
 */
function kwp_sc_get_hook_instance_object( string $hook, string $function_name, int $priority = 10 ) {
	global $wp_filter;

	if ( empty( $wp_filter[ $hook ] ) || empty( $wp_filter[ $hook ][ $priority ] ) ) {
		return false;
	}

	foreach ( $wp_filter[ $hook ][ $priority ] as $key => $callback ) {
		if ( false !== stripos( $key, $function_name ) ) {
			return $callback['function'][0];
		}
	}

	return false;
}

add_action( 'wp_loaded', function () {
	if ( ! class_exists( 'Wt_Smart_Coupon_Store_Credit_Public' ) || ! class_exists( 'Wt_Smart_Coupon_Common' ) ) {
		return;
	}

	$cart_priority  = Wt_Smart_Coupon_Common::get_calculate_totals_hook_priority( 1000, 'woocommerce_after_calculate_totals' );
	$order_priority = Wt_Smart_Coupon_Common::get_calculate_totals_hook_priority( 1000, 'woocommerce_order_after_calculate_totals' );

	$instance = kwp_sc_get_hook_instance_object( 'woocommerce_after_calculate_totals', 'after_calculate_totals', $cart_priority );

	if ( ! $instance ) {
		return;
	}

	remove_action( 'woocommerce_after_calculate_totals', [ $instance, 'after_calculate_totals' ], $cart_priority );
	remove_filter( 'woocommerce_order_get_total_discount', [ $instance, 'add_coupons_discount_to_total_discount' ], 10 );
	remove_action( 'woocommerce_order_after_calculate_totals', [ $instance, 'order_calculate_discount_amount' ], $order_priority );
} );

After adding the snippet, clear your caching plugin’s cache, apply a store credit coupon to a test cart, and check that the discount matches the coupon’s value.

If you’ve issued store credit with WebToffee and want to move it all to Store Credit, contact our support team before you deactivate WebToffee. We’ll check your existing credit and help you move it over, so your customers keep their balances.

Keep learning