Documentation/Smart Coupons for WooCommerce/How to add a custom image for store credit design

How to add a custom image for store credit design

Smart Coupon for WooCommerce allows you to offer Store Credits for the customers in the form of refunds or as gifts.

The Store Credit model allows your customers to choose a template from the available pre-defined templates. The customers will get to choose a gifting template from the available options from the product page. This template will also be used for email. The store credit product preview will be as shown below:

Smart Coupon for Woocommerce-Store Credit Product Preview

However, you can add a custom image for store credits gifting templates instead of predefined ones. New images can be inserted using a filter as given below. Insert the below-given snippet to the functions.php of the active child theme.

You can replace the <image_url> with the URL of the image you want for the store credit gifting template. Using the above code snippet will remove the default templates. You can comment on the following lines from the code to keep default templates as it is.
unset( $credit_templates[‘happy_birtday’] );
unset( $credit_templates[‘new_year’] );
unset( $credit_templates[‘anniversary’] );
unset( $credit_templates[‘christmas’] );

You can read more about store credits here.

  • Was this article helpful?
  • YesNo