WooCommerce

myCRED has extensive support for WooCommerce allowing you to sell points via WooCommerce or let users pay using points on checkout.

myCRED supports WooCommerce 2.2 or higher.

Pay using Points

Once the add-on is enabled, your WooCommerce installation will receive a new payment gateway called “myCRED”. This gateway works just like other payment gateways for WooCommerce and allows your users to select to pay using points on checkout.

If you use a real currency as your store currency, the gateway will ask you to provide an exchange rate between points and your stores currency. When the user goes to the checkout page, this exchange rate is applied to their cart total and if they have enough points, the gateway will become available. If they do not have enough points, the gateway will not be visible.

Setup guide:

  1. Make sure myCRED and WooCommerce is installed and setup.
  2. Activate the Gateway Add-on on the myCRED Add-ons page.
  3. Go to your WooCommerce Settings page in your admin area.
  4. Select “Payment Gateways” in the top tab row.
  5. Select “MyCRED” next to “Payment Gateways” in bold.
  6. Adjust the gateway settings to suit your needs.
  7. Click “Save Changes”.
  8. Done!

Points Only Store

As of version 1.3 you can select any of your setup point types as your store currency as myCRED will add them in the currency dropdown in your WooCommerce settings.

If you select to use points as your store currency, all product prices will be shown in points, formatted as you set your point type to be formatted.

When using a points only store, the only payment gateway that is supported is the myCRED gateway. PayPal for example will not understand the points as a currency.

Setup guide:

  1. First, make sure you are happy with the way your points are presented to users. If you want you can change the name, format and style of your points on the myCRED > Settings page under “Core Settings”.
  2. Make sure the “Gateway” add-on is enabled on the myCRED > Add-ons page.
  3. Go to your WooCommerce Settings page in your admin area.
  4. In the “Currency” dropdown menu you should have on the bottom of the list the name of each point type you have setup. Select the one you want to use as payment.
  5. Once you select to use points as your currency, myCRED will take over how prices are shown in your store to match your myCRED settings. So any formatting you might have set on this page will be ignored.
  6. Save.
  7. Next, select “Payment Gateways” in the top tab row.
  8. Scroll down to view the list of enabled gateways and click on the settings button for each gateway and disable them. You should only have one gateway enabled here, and that is myCRED.
  9. Click “Save Changes”.
  10. Done!

Point Rewards

You can setup myCRED to reward your users with points for each product the user buys.

Setup guide:

  1. Make sure the Gateway Add-on has been enabled on the myCRED > Addons page.
  2. Edit a product.
  3. In the top right corner of the product editor you should see the “myCRED Reward” metabox. Tick the checkbox for each point type you want to award and set the amount value.
  4. Save the product.
  5. Repeat the above steps for each product.

No points are paid out if the order is paid with points!

By default, myCRED will payout this reward when the order has been marked as “Paid”. This of course means that using manual payment gateways (like Bank Transfer or Check), will not trigger the payout. To get around this, you can use the following code snippet to move the payout process to when the order is marked as “Completed”.

Point for Review Hook

If WooCommerce is installed, myCRED will automatically add the “Points for Product Reviews” hook, allowing you to award or deduct points from users for leaving a product review.

Only the first review of each product will trigger a payout. If a user leaves multiple reviews on the same product, only the first one will payout.

Setup guide:

  1. Make sure WooCommerce is installed and enabled.
  2. Make sure product reviews are enabled in WooCommerce. You can check this by visiting the WooCommerce > Settings page and click on the “Products” tab.
  3. Go to the myCRED > Hooks page or the Hooks page for any custom point type.
  4. Enable the “WooCommerce Product Reviews” Hook.
  5. Set the amount of points a user gets for a new review.
  6. Set the log template.
  7. Save

Sell Points via Products

Instead of using buyCRED to sell points to your users, you can use WooCommerce by creating products that reward points based on your setup.

When a user buys these products, they will receive their points once the Order has been marked as “Paid”. This means that if you are testing and manually completing an order, points will not be paid out. If this is not to your liking, you could use a custom code snippet in order to payout points when an order has been “Completed” instead.

 

Please note that in the following instances points will not be paid out:

  • If the buyer is not logged in.
  • If the buyer pays using points for the order.
  • If the buyer is set to be excluded from using myCRED.

Setup guide:

  1. Make sure WooCommerce is installed and enabled.
  2. Enable the myCRED Gateway add-on on the myCRED > Addons page in your admin area.
  3. Create a new product that will give users points.
  4. Set the product to be “Virtual” but not Downloadable.
  5. Set the price of the product.
  6. In the top right corner of the product edit screen, enable the myCRED Reward metabox and set the amount of points a user gets when they buy this product.
  7. Publish the product.
  8. Done!

Points to Coupons

I have built a custom code snippet which you can use to allow your users to convert their points into a WooCommerce coupon which they can apply to their cart for a discount. Place the code snippet into your child theme’s functions.php file and insert the mycred_to_woo_coupon shortcode in a post or page for your users to use.

Last edited February 24, 2017