=== bLoyal: Loyalty & Promotions by bLoyal ===
Contributors: connectordev
Tags: Omni-channel Loyalty, Subscriptions & Engagement, CAA & AAA, Loyalty promotions, Loyalty Points
Requires at least: 5.6
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 3.1.1122.0108
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html



bLoyal provides real-time customer loyalty and omni-channel order processing to your WooCommerce web store.



== Description ==



### Introduction ###



bLoyal enables WooCommerce users to grow their loyal customer base and engage with their customers across all devices and sales channels.



The bLoyal App enables you to have a single customer master record across your WooCommerce store and physical store(s) and run a consistent loyalty program, promotions, and engagement across all your sales channels. bLoyal also enables you to sell and accept gift/egift cards and customer loyalty tender in WooCommerce and in your physical store.

For more information, please go to [bLoyal.com]( https://bloyal.com )



### Major features in bLoyal include: ### 



* Powerful promotions and loyalty programs

* Single Master Customer Record.

* Automated Subscriptions.

* Referral Programs

* Real-Time Lifecycle Engagement.

* Click-and-Collect- Sell online and pick up in store.



[REQUEST A DEMO]( https://bloyal.com/request-demo/ )



For complete list of features and details, please visit [More Information]( https://bloyal.com/woocommerce-integration/ )



To learn how to install the plugin, navigate to the Installation tab. For detailed guidance on the installation and setup of the plugin, refer to the [plugin documentation](https://mysupport.bloyal.com/hc/en-us/articles/360022898114-bLoyal-Plugin-for-WooCommerce-Update-Setup-Guide/).



[youtube https://www.youtube.com/watch?v=cV4qY7I-6cU]



[Terms and Conditions](https://mysupport.bloyal.com/hc/en-us/article_attachments/360047099174/bLoyal-SubscriptionAgreement.pdf)



PS: Once integrated, you’ll have access to an unrivaled set of loyalty program management tools that will help achieve your business goals;



== External services ==

This plugin integrates your store with bLoyal, the loyalty and promotions platform. A bLoyal account
is required: bLoyal performs the loyalty and promotion calculations that the plugin reflects back into
WooCommerce, so the plugin cannot operate without contacting it.

**Service discovery.** The plugin requests
`https://domain.bloyal.com/api/v4/serviceurls/<your-login-domain>` to learn which bLoyal servers your
account uses. It sends your bLoyal Login Domain. The per-account hosts returned are stored in your
WordPress options and used for every call below.

**Loyalty, promotions and order processing.** To the hosts returned by discovery, the plugin sends
cart and order data so bLoyal can calculate discounts and record the sale: line items with SKU,
quantity and price, shipping method and totals, coupon and gift-card codes the shopper enters, and the
order identifier. When the shopper is identified it also sends their first and last name, email
address, phone number, company name, billing and shipping address, and date of birth where your store
collects it. These calls occur when the cart is calculated, during checkout validation, and when an
order is placed or refunded.

**Web Snippets.** Every storefront page loads
`https://snippets.bloyal.io/bLoyalSnippetLoader.js`, and that script then requests
`https://domain.bloyal.io/api/v4/serviceurls/<your-login-domain>` from the visitor's browser. This
happens on every page view, for every visitor, whether or not the plugin has been configured with a
bLoyal access key.

**Device provisioning.** When an administrator activates a device or a snippets URL in the plugin
settings, wp-admin calls `https://domain.bloyal.io/api/v4/ServiceProvisioning/Sessions/...`, sending
the provisioning code entered on that screen.

**Diagnostic logging.** When logging is enabled in the plugin settings, the plugin uploads its log
file to the logging host returned by discovery. Those log entries contain the request and response
bodies of the calls above, including the personal data listed there.

**Payment services.** Stored-payment and tender operations use the payment host returned by discovery,
falling back to `https://ws.bloyal.com` when no host has been stored.

The plugin's own code contacts only the bLoyal endpoints listed above. bLoyal's privacy policy:
https://bloyal.com/privacy-policy/

== Installation ==



= Minimum Requirements =



* PHP 7.4 or higher is required

* WordPress 5.6 or higher is recommended



= Prerequisites =



[REQUEST A DEMO]( https://bloyal.com/request-demo/ )



= Steps to install the plugin =



Step 1: Log in to your WordPress dashboard. 

Step 2: Upload the plugin folder to the /wp-content/plugins/ directory, or install the plugin directly from the WordPress Plugin Directory. 

Step 3: Activate the plugin through the 'Plugins' menu in WordPress. 

Step 4: Go to the 'bLoyal' menu and configure the plugin as per your requirements.



== Frequently Asked Questions ==



= What does the Plugin do? =



The bLoyal WooCommerce plugin syncs your ecommerce and other POS systems data with bLoyal, so you can engage your customers with targeted email marketing, automation, and promotions. With the combined power of WooCommerce and bLoyal, this plugin gives you all the tools you need to grow your online store and delight your contacts and customers. 



= Who should use the bLoyal WooCommerce plugin? =



This extension is perfect for Magento store owners who want to be able to track their customers and to engage with them by segmented and automated email and text campaigns, targeted promotions and loyalty programs to increase their customer lifetime value. 



= What types of loyalty programs does the plugin support? =



The plugin is very configurable so that you can points, frequent buyer, cashback, and many other loyalty programs.



= Are coding skills needed to use the bLoyal WooCommerce plugin? =



Not at all! The bLoyal WooCommerce plugin is easy to download and starts working with your WordPress site right away. 



= My question is not listed =



Visit bloyal.com or send us an email to info@bloyal.com and someone from our team will contact you shortly to answer all your questions. 



== Screenshots ==



1. Powerful Promotions

2. Create your own Loyalty Program in three easy steps

3. Automated Life Cycle Engagement

4. Single Master Customer Record

5. Subscriptions & Club Management



== Changelog ==

= 3.1.1122.0108 =

*Release Date - 17 Nov 2026*

Fix CON-270: on the classic checkout, a signed-in shopper with no saved card no longer gets bLoyal's "Add Payment Method" and Customer Info dialogs over the page before choosing anything. The Stored Payment snippet now loads only when the shopper picks Stored Payment; before, it loaded with the page whatever method was selected, and again on every checkout refresh, so the dialogs could open twice. The Checkout block was not affected.

= 3.1.1122.0107 =

*Release Date - 11 Nov 2026*

Add CON-155: bLoyal now works on the WooCommerce Cart and Checkout blocks, the default on new stores, and the plugin declares block support. On the blocks: bLoyal coupons apply and can be removed (CON-259), the Loyalty & Discounts summary shows and follows every cart change (CON-260), bLoyal alerts open and block Place Order until handled (CON-261), the Birth Date, gift message, shipping email and Order Instructions fields are on the checkout (CON-262), Pickup at Store offers the Click & Collect store picker (CON-263), and the Loyalty Dollar, Gift Card and Stored Payment tenders can be used (CON-264, CON-265, CON-266). A block order runs the same checks and ApproveCart as the classic checkout, and Calculate, Approve and Commit share one CartUid (CON-258). The classic cart and checkout are unchanged.

bLoyal's parts of the blocks use WooCommerce's own block markup, so they look like the rest of the checkout and follow the store theme: the Loyalty & Discounts summary uses the order summary's rows, the Gift Card number and the redeem amount use the checkout's own field and select with Check Balance and Apply Balance beside them, and the Stored Payment snippet takes the checkout's text size.

Stored Payment no longer reports a card as selected when the selection was not saved, and no bLoyal payment method prints error text into the checkout response when a payment fails.

= 3.1.1122.0106 =

*Release Date - 11 Nov 2026*

Tested up to WooCommerce 11.2.2 (CON-236). No code change: on WooCommerce 11.2.2 the plugin showed no new errors or deprecation notices, and coupons, cash on delivery, loyalty dollars, order submission to bLoyal and refunds behaved as on 10.8.1. The third part of the version number now reads 1122, the WooCommerce release it was tested with.

Note for support: on WooCommerce 11.2.2, a block theme that shows the Mini-Cart in its header makes the browser request a ".../undefinedwc/store/v1/cart" address on the cart, checkout and order-received pages, which answers "page not found". This comes from WooCommerce itself (woocommerce/woocommerce issue 68484), not from the bLoyal plugin, and did not affect bLoyal pricing or orders in testing.

= 3.1.1081.0105 =

*Release Date - 10 Nov 2026*

Fix CON-269: on the classic checkout, card payments with WooCommerce Stripe Gateway 10.9.1 or later no longer fail with "Please fill in all required fields." while the bLoyal plugin is active. The hidden Gift Message box was flagged as required, so Stripe treated it as an empty required field even when the order was not a gift. The Gift Message stays optional, as it already was in practice, and keeps its 1000-character limit.

= 3.1.1081.0104 =

*Release Date - 05 Nov 2026*

Add CON-235: the plugin now supports WooCommerce High-Performance Order Storage (HPOS), the default for new stores, and declares it, so WooCommerce no longer lists it as incompatible. Every order read and write goes through the WooCommerce order API, so bLoyal gift card, loyalty dollar and stored payment transaction ids, the CommitCart payment details, refunds, the Submit Order to bLoyal button and the order screen work with HPOS on, with or without compatibility-mode sync, and with the legacy posts tables. Pickup orders now also clear the shipping address on HPOS stores, and the order-received page no longer logs PHP warnings when it is reloaded.

Note for support: orders placed before this version on an HPOS store without sync are still found. On a store that ran HPOS with compatibility-mode sync on, WooCommerce removed the bLoyal tender transaction id from orders placed before this version, so refunds of those gift card, loyalty dollar and stored payment orders cannot reach bLoyal from WooCommerce and have to be reconciled by hand.

= 3.1.1081.0103 =

*Release Date - 27 Oct 2026*

Fix CON-231: a store with a large web snippet profile no longer loses its page content. The plugin registers four shortcodes for every snippet, and for every club of a snippet that has clubs, and WordPress combines the names of all registered shortcodes into a single pattern; past about 32 KB of names that pattern can no longer be built, and pages, product descriptions and the My Account login form render empty. Up to 24,000 bytes of names the plugin registers every snippet as before. Above that - which includes some stores between 24 and 32 KB that were never affected - it registers only the snippets the site actually uses, found by a background scan of pages, posts, products, widgets, settings, category descriptions and theme files. A snippet added to the content or excerpt of a page or post, or to the description or short description of a product, works as soon as it is saved. One added anywhere else - a product variation description, a widget, a category or tag description, a page-builder field or a theme file - shows as raw [bloyal_...] text until the next scan, usually within a day. Developers can change the size with the BLOYAL_SNIPPET_TAG_BUDGET constant, and add shortcode tags the scan cannot see with the bloyal_snippet_tags_in_use filter.

Note for support: the fix takes effect after the first background scan, which needs WP-Cron and starts with the first page view after the update. Confirm it has run - wp option get bloyal_snippet_tags_in_use returns a list - or, on a store without WP-Cron, run wp cron event run bloyal_scan_snippet_tags; then purge the page cache, so that no page cached while empty is still served. Separately, when no snippet list has been saved and the device lookup fails, the plugin no longer makes a second, empty request to bLoyal on every page.

= 3.1.1081.0102 =

*Release Date - 23 Oct 2026*

Fix CON-240: no more fatal errors on PHP 8 in six unusual cases - a zero quantity on a sale-priced item, a zero-price line with several taxes, a bLoyal reply without addresses or shipping carriers, and "Submit Order to bLoyal" on an order whose product was deleted (it now stops and adds an order note). Gift card, loyalty dollar and stored payment tenders need the PHP soap extension; without it they now decline with a clear entry in WooCommerce > Status > Logs instead of crashing, and their refunds report a failure instead of a false success.

= 3.1.1081.0101 =

*Release Date - 18 Sep 2026*

Fix CON-205: the plugin no longer asks bLoyal for a shopper's saved shipping addresses when there is no shopper to ask about. A guest checkout was still making that call on every page of the checkout - typically eight times per order - and bLoyal rejected each one, because the plugin skipped the call only when the customer identifier was empty, while bLoyal signals an unidentified shopper with a placeholder identifier instead. Nothing was visible to the shopper and no order was affected; the cost was wasted requests during checkout and an error recorded against the store on every guest visit. The fix released in 3.1.611.94 addressed the same call but missed this case.

Note for support: on a guest checkout the "Saved addresses" field now reads "Please Configure shipping address.." where it previously read "Select an address...". Both appeared over an empty list; the new wording is the accurate one.

= 3.1.1081.0100 =

*Release Date - 11 Sep 2026*

Fix CON-192: orders no longer reach bLoyal Director a cent out of balance. WooCommerce rounds tax separately for each line and for shipping, then adds the rounded figures up; bLoyal adds its own unrounded figures up and rounds once at the end. On an order of $53.99 plus $19.85 shipping at 10.4%, WooCommerce charged $81.51 and bLoyal expected $81.52, so Director held the order in problem status with "Approved payment(s) does not match order total" and it could not be processed. Roughly one in four orders that carry taxable shipping is affected, and it needs at least two taxed amounts on the order, so orders with no shipping charge - virtual goods, store pickup, free shipping - were never affected.

Both ways of rounding are legitimate, and WooCommerce itself offers the choice as a store setting. Where bLoyal supplies the tax, the plugin now applies bLoyal's convention: WooCommerce keeps the full-precision figures and rounds the tax once, at the order total. This means a store using bLoyal tax now rounds tax at the subtotal for every order, including orders created in wp-admin, and the Tax line will no longer always equal the tax rate times the taxable amount - it matches what the jurisdiction charges, and only the final total is rounded. A site that needs the previous behaviour can restore it with the bloyal_force_tax_round_at_subtotal filter. Note for support: on a store using bLoyal tax, "Round tax at subtotal level" under WooCommerce > Settings > Tax now shows as ticked and will return to ticked if it is unticked and saved, because the plugin supplies the value; the filter above is the way to change it. On the order edit screen the per-line Tax figure can read a cent below the Tax total, and the editable tax field can show extra decimals; that is the fix working, not a display fault - the total is what the jurisdiction charges.

The tax figures reported back to bLoyal now carry their full precision instead of being truncated to whole cents. The truncation lost a cent on about one value in twenty and was applied on the "Submit Order to bLoyal" button as well, which would have reverted the correction on the very orders that need to be resubmitted by hand. It also affected any single tax amount of $1,000 or more, which was sent with a thousands separator - "1,234.56" - and was rejected outright rather than merely being a cent out.

This was not introduced by a recent release. The behaviour dates to the plugin's original code; it became visible in August 2026 when unrelated compliance checks that had been filling Director with problem orders were switched off, leaving the payment variance as the only remaining signal.

Known limitation: this was verified on WooCommerce 10.8.1. Behaviour on older WooCommerce releases has not been confirmed.

Version numbering: the third segment of the version carries the WooCommerce release the plugin was tested against, and had been left at 611 - WooCommerce 6.1.1 - since 2022. It now reads 1081 for WooCommerce 10.8.1, and the build number is zero-padded to four digits. The jump is a numbering correction only; it does not indicate a larger change than the one described above.

= 3.1.611.99 =

*Release Date - 10 Sep 2026*

Fix CON-204: an order is no longer submitted to the bLoyal Order Engine more than once. The submission was tied to the order-received page and repeated on every load of it, so a shopper who refreshed that page, or returned to it from an email link, caused a second submission. On a store using the Order Engine with a payment gateway that authorizes without capturing, that second submission rewrote the payment on the bLoyal sales order and left it flagged with a payment problem that had to be cleared by hand. The plugin now records the submission once bLoyal has confirmed it and ignores later loads of the page. A submission that bLoyal did not confirm is still retried, and the order note now states the reason instead of appearing blank.

= 3.1.611.98 =

*Release Date - 08 Sep 2026*

Fix CON-207: the plugin no longer creates a duplicate tax-rate record every time a cart is calculated. When bLoyal returned a cart line with no tax details, the plugin added a new zero-rate record to WooCommerce's tax-rate table without checking whether an identical one already existed. On a busy store these accumulated into the hundreds of thousands, and because WooCommerce loads every record in a tax class in order to price a line, the cart and checkout eventually failed with a server error once that data outgrew the site's memory limit. The plugin now reuses the existing zero-rate record, so at most one is ever created.

Note for merchants: a store that has already accumulated these records will not recover from this update alone - the existing rows still have to be removed, keeping one. Contact bLoyal support if your cart or checkout is failing.

= 3.1.611.97 =

*Release Date - 07 Sep 2026*

Fix CON-202: the plugin no longer takes the site down when WooCommerce is inactive. If WooCommerce was deactivated, updated badly, or missing on a copied site while bLoyal stayed active, the plugin kept calling WooCommerce functions that no longer existed. Every storefront page returned a server error, and so did the bLoyal settings screen - the very page an administrator would open to work out what was wrong. Both now load.

Error handling no longer fails on its own. Eleven error handlers called a logging method their class did not have, and the shared logging method itself depended on WooCommerce, so a handled error turned into a fatal one. The clearest case was the order-received page: when a completed order could not be submitted to bLoyal, the shopper saw an error page after paying and the failure was never recorded. The page now loads and the failure is written to the bLoyal log.

Note for support: these particular diagnostics are written to the bLoyal log file, so bLoyal logging must be enabled in the plugin settings to see them.

The log writer is more careful with the log itself. It stops cleanly when the log file cannot be opened and records why, instead of failing the whole request; it no longer deletes the existing log when it fails to copy it; and a logging failure can no longer trigger itself repeatedly.

No change to cart, checkout, tender or order-submission behaviour when WooCommerce is active.

= 3.1.611.96 =

*Release Date - 03 Sep 2026*

Internal compliance work for the WordPress.org plugin directory. Twelve plugin files that could previously be requested directly in a browser now exit unless WordPress loaded them.

The readme header block is valid again, so the Stable tag and License lines parse correctly.

The listing now declares the bLoyal services the plugin contacts and what is sent to them, the tag list and short description fit the directory limits, and the long-obsolete upgrade notices have been removed.

No cart, checkout, or bLoyal request path changes.

= 3.1.611.95 =

*Release Date - 27 Aug 2026*

Fix CON-179: Orders paid in full with a gift card or with loyalty dollars are no longer marked as paid when the money has only been authorized. On stores that use the bLoyal Order Engine these tenders place a hold rather than taking the funds, and bLoyal Director captures them later - but WooCommerce was moving the order straight to Processing and recording "Payment complete". Such an order now stays On hold until the capture happens, with the authorization's transaction code recorded on an order note.

Stores that do not use the Order Engine are unaffected: the tender still redeems immediately and the order still goes to Processing as before.

The approval code returned by the authorization is now also sent to bLoyal when the order is committed. It was previously discarded, so these orders reached bLoyal with an empty authorization code even though one had been issued.

This affects only orders paid entirely by one of these two tenders, which requires "Apply Full Balance" to be enabled for that tender. Split-tender orders, where a gift card or loyalty dollars cover part of the total, were already correct and are unchanged.

= 3.1.611.94 =

*Release Date - 27 Aug 2026*

Fix CON-187: The plugin no longer asks bLoyal for a customer's saved shipping addresses when it has no customer to ask about. On a guest visit the address book requested the address list with an empty customer identifier, which bLoyal cannot answer, so it recorded an error on every such visit. The request is now skipped when there is no customer, and when there is one it carries only the identifier that has a value, correctly encoded.

Nothing changes for a shopper. The saved-address list behaves exactly as before for signed-in customers, and the address book still shows its placeholder when there is nothing to list. Two PHP warnings on those same paths are also gone: one on the checkout page, and one on the saved-address response, where a warning printed ahead of the JSON could corrupt it.

= 3.1.611.93 =

*Release Date - 25 Aug 2026*

Fix CON-193: The shipping carrier and service mapping on the bLoyal Order Processing settings page now saves, and is now actually used. Two independent problems were at work. Saving the page wrote an empty value over the whole mapping, so the selections were gone on the next page load. And the code that looks up the mapping when a shipping method is chosen had been commented out since December 2022, so even a correctly stored mapping was never read and the carrier and service codes sent to bLoyal stayed empty. Both are fixed.

This only affects WooCommerce's own shipping methods - Flat rate, Free shipping and Local pickup. Shipping rates that come from bLoyal carry their own carrier and service codes and were never affected by this.

The settings page also reported a successful save even when nothing had been saved, which is a large part of why this went unnoticed for so long. It now shows an error when the save fails.

Note for merchants: any store that saved this page on an earlier version already has an empty mapping, and this release cannot recover it. Re-enter the carrier and service for each shipping method once after updating.

= 3.1.611.92 =

*Release Date - 25 Aug 2026*

Fix CON-180: The gift message on the checkout page is now capped at 1000 characters, the limit bLoyal enforces on the GiftComment field. A longer message was accepted into the cart and then rejected by bLoyal when the order was submitted, so the order was placed and the customer charged while the sale never reached bLoyal Director. The message is now limited in the browser and re-checked on the server, and the customer is asked to shorten it before the order is placed.

Orders that already failed this way are not lost. The gift message is stored on the WooCommerce order and shown on the order screen, and the admin "Submit Order to bLoyal" button submits the order to Director. Note that the resubmit path does not carry the gift message across, so copy it over by hand if Director needs it.

Also silenced a PHP warning in the ApproveCart response handler. When bLoyal rejects a cart it returns an error without the data object the handler was reading from, which raised a warning on every rejected cart. The handler now defaults to "not approved" explicitly; no behavior changes.

= 3.1.611.91 =

*Release Date - 21 Aug 2026*

Fix CON-177: Only mark a stored-payment order as paid when the funds were actually captured. With the bLoyal Order Engine enabled the gateway authorizes only - bLoyal Director Order Processing captures the funds later using the transaction code sent on CommitCart - but the gateway still called payment_complete(), which pushed the WooCommerce order to Processing (or straight to Completed for a virtual-only cart) on an authorization alone. Those orders now stay in On hold, with an order note recording the authorize transaction code, matching how an authorize-only card gateway behaves. Stores that are not using the Order Engine still capture at checkout and are unchanged. CommitCart behavior is UNCHANGED: the commit still fires on order placement regardless of order status, exactly as before.

Note for merchants using the Order Engine: those stored-payment orders now remain in On hold until bLoyal Director captures the funds, and nothing in the plugin moves them out of it. If your fulfilment process watches the Processing status, it needs to watch On hold for these orders instead. Stock is still reduced once at checkout, and the order is still submitted to bLoyal exactly as before.

The four bLoyal payment gateways no longer ship placeholder text in their Instructions setting. That field's default value was the admin help sentence describing what the field is for, and WooCommerce prints the field's contents in the customer's order email whenever the order is On hold - which the change above makes common. The default is now empty. Stores that had already saved these gateway settings still hold the old text in the database and should clear the Instructions field.

Also pass through the approval code bLoyal returns on authorize. It was being discarded, so CommitCart reported an empty AuthCode even though bLoyal had supplied one. It is now forwarded on both paths: the authorize-only path used with the Order Engine, and the capture path, where the plugin received the code in its own authorize call and then dropped it because bLoyal's capture response does not repeat it. This is a pass-through fix; there is no evidence the empty value was breaking anything.

Read the cart identifier from the order rather than the session when submitting an order to bLoyal. The session copy is cleared when WooCommerce empties the cart, which happens before the confirmation page runs the submission, so a cart recalculation in that window could leave a newly created empty cart in the session and submit that one instead, reporting no items and no shipping charge. The order's own stored identifier is written while the cart still exists and cannot be replaced by a later recalculation. The session is still used when an order has no stored identifier.

= 3.1.611.90 =

*Release Date - 21 Aug 2026*

Security: the cart-handoff route no longer signs anyone in. Opening a bLoyal cart link transfers the cart to WooCommerce as before, but the plugin no longer uses the customer identifier returned by the API to log a visitor in, and no longer creates a WordPress account from it. A visitor arriving from a cart link continues as a guest, or signs in through WooCommerce's own login. This is a deliberate change in behavior: stores that relied on shoppers arriving already signed in will notice it.

The same route now declares an explicit permission callback and validates the cart identifier it receives. It answers with a 503 status instead of a fatal error when WooCommerce has not set up a cart for the request, which is what happened on /wp-json/ style requests.

Tested up to WordPress 7.1.

= Older releases =

The changelog for 3.1.611.89 and earlier is in changelog.txt, in the plugin folder.


== Support ==



[Get quick answers to your questions with support resources, documentation, and step-by-step video walk-throughs for common bLoyal’s frequently asked questions]( https://mysupport.bloyal.com/hc/en-us )
