WooCommerce 8.7 Beta: Receipt Rendering Engine & More

We’re excited to announce that the latest WooCommerce Beta release is now available for testing. You can download it directly from WordPress.org or install it via the WooCommerce Beta Tester Plugin.

Known Issue

We are aware of a PHP Fatal with the Germanized extension:

PHP Fatal error: Uncaught Exception: The LegacyProxy class is not intended for getting instances of classes in the src directory, please use init method injection or the instance of Automattic\WooCommerce\Vendor\Psr\Container\ContainerInterface

The issue is being tracked here. If you experience this bug, please comment on that issue and note the plugin that you are having an issue with.

Product Collection Block Enhancements

Scroll to Top & Loading Animation: Following your feedback, we’ve introduced a “Scroll to Top” feature for a smoother browsing experience within the Product Collection block.

We also added a new loading animation signals when products are being refreshed, integrating seamlessly with your theme’s primary color.

Receipt Rendering Engine

Built on top of the transient files engine that was introduced in WooCommerce 8.6, the new receipts printing engine allows generating public temporary URLs for the HTML representation of a receipt for an order. These URLs are unauthenticated, so they can be sent to any printing service in order to get a paper copy of the receipt.

The information included in the receipt, as well as its formatting, is the same as the receipts that are already provided by the WooCommerce mobile applications. This includes the credit card icon and last four digits when the order is paid using WooCommerce Payments.

The engine can be accessed via two new REST API endpoints:

  • POST /wp-json/wc/v3/orders/<order id>/receipt will generate a new receipt and return its public URL, or will just return the public URL of a receipt that had been generated previously. An optional expiration_date=yyyy-mm-dd argument or an expiration_days=n argument can be added to the query string to specify when the receipt will expire (the default is one day later than the current date). Also force_new=true can be optionally specified to force the generation of a new receipt, discarding a previously generated one.
  • GET /wp-json/wc/v3/orders/<order id>/receipt is similar to the POST counterpart, but this time if no receipt had been generated previously then a “Not found” error will be returned.

A note on security. Although the generated URLs are public, they don’t contain order ids, but unrelated random hashes instead; therefore it’s not possible to reconstruct the receipt URL by trying to guess the order id. The REST API endpoints on the other hand receive an order id, but these are regular authenticated endpoints that require the “read order” capability.

These REST API endpoints will be used by the WooCommerce mobile apps to offer receipt printing functionality when the server is on WooCommerce 8.7 or newer.

Checkout Additional Fields API

WooCommerce 8.7.0 ships with an experimental version of the Additional Fields API feature that we have been working on for Checkout Block. This feature is developer only and is currently prefixed with an experimental prefix. It gives you the ability to introduce native additional fields in the Checkout block that will be rendered, collected, and shown all over WooCommerce, from the My Account page, Order Admin, to Emails, and Order Confirmation screens. We invite you to experiment with it, test it, and to make sure it fits your use case.

Here are the docs and tutorial about how to use additional checkout fields.

Moroccan Regions Support

We’ve added comprehensive support for Moroccan regions, enabling more accurate shipping, tax calculations, and customer segmentation. This update ensures a localized shopping experience for your Moroccan customers.

The following are screenshots where this update can be observed:

Database changes

This release adds a new update to the database in order to prevent listing of the default transient files directory, default_transient_files_dir. This change was introduced in #43502.

Release Schedule

We’re on track for our planned March 12, 2024 release.

VersionRelease
Release CandidateMarch 5, 2024
Final ReleaseMarch 12, 2024

Testing

If you’d like to dive in and help test this new release, our handy WooCommerce Beta Tester plugin allows you to switch between beta versions and release candidates. You can also download the release from WordPress.org.

We’ve posted a helpful writeup on beta testing to help get you started.

Found a Bug? We want to hear about it! Please report any issues you encounter via GitHub.

Looking Ahead: WooCommerce 8.7 is shaping up to be a great update, and there is more to come! We’ll share more about this release when we announce the Release Candidate on March 5. As always, we thank you for your feedback and contributions.


4 responses to “WooCommerce 8.7 Beta: Receipt Rendering Engine & More”

  1. Does this release requires a DB update? Any non retrocompatble-feature? Thanks in advance!

    1. Ivan Stojadinov Avatar
      Ivan Stojadinov

      Hi Daniel,

      Thanks for the feedback. Indeed, this release requires a database update, we updated the post with a section labelled “Database changes”.

  2. > We are aware of a PHP Fatal with the Germanized extension:
    With the competitor plugin “German Market”, everything runs smoothly, as always.

  3. […] sviluppatori, come suggerisce il post ufficiale, hanno aggiunto una nuova animazione di caricamento che segnala quando i prodotti vengono […]

Leave a Reply

Your email address will not be published. Required fields are marked *