Import Square product descriptions as plain text

Use this filter to import Square product descriptions as plain text instead of HTML.

Note:

This is a Developer level doc. If you are unfamiliar working with code and resolving potential conflicts, we recommend you work with a Woo Agency Partner for larger projects, or find a WooCommerce developer on Codeable for smaller customizations. We are unable to provide support for customizations under our Support Policy.

Disable HTML descriptions

↑ Back to top

Add this filter to a custom plugin on a staging site. It disables HTML description handling for product data received from Square.

<?php
add_filter( 'wc_square_enable_html_description', '__return_false' );

Verify the result

↑ Back to top

Sync a linked test product whose Square description contains formatting, and check its description in WooCommerce. Remove the filter to restore HTML handling on subsequent syncs. Test before deploying because this change can remove formatting from synced descriptions.

Related Products

WooCommerce Subscriptions is a WooCommerce extension that lets customers subscribe to your products or...

Offer Royal Mail shipping rates to your customers.

Use of your personal data
We and our partners process your personal data (such as browsing data, IP Addresses, cookie information, and other unique identifiers) based on your consent and/or our legitimate interest to optimize our website, marketing activities, and your user experience.