Add New Allowed Tags to Shipping Description

The shipping description field is a useful tool for providing extra information to your customers. Sometimes it is further useful to format the text with HTML tags to clarify important text or link to a new page. There are currently 16 allowed tags for the description field. These were chosen based on common need and what WooCommerce could handle in the small space. However sometimes your site may need something else that is not provided in this list.

Current Allowed Tags

The currently allowed tags (including their attributes) are defined below:

  • a
    • href
    • title
  • abbr
    • title
  • acronym
    • title
  • b
  • blockquote
  • cite
  • br
  • cite
  • code
  • del
  • datetime
  • em
  • i
  • p
    • align
    • dir
    • lang
    • xml:lang
  • q
    • cite
  • s
  • strike
  • strong

Adding a New Tag

The allowed tags for the descriptions are specified uniquely for this plugin. So to add to them you will need to use a special filter function. The code snippet below shows how to add the <img> tag with a few additional attributes.

  • Was this article helpful ?
  • yes   no