Change the ShipStation gift message limit

Adjust the gift message limit at checkout by adding a filter to a custom plugin. This guide shows how to set the limit to 500 and verify it with a test order.

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.

Before you begin

↑ Back to top

You’ll need an active ShipStation for WooCommerce extension, gift order functionality enabled, and a connected ShipStation store. Use a test environment and a custom plugin that can run PHP filters. Confirm you can disable that customization if necessary.

Set the limit

↑ Back to top

The extension uses a limit of 255 by default and constrains the filtered value to the range from 1 to 1,000. Add this example to your custom plugin:

add_filter(
	'woocommerce_shipstation_gift_message_max_length',
	function () {
		return 500;
	}
);

Replace 500 with the limit your store needs. Activate the custom plugin in your test environment.

Verify the limit

↑ Back to top

Place an eligible test order with a gift message using each checkout type your store offers. Check that the message is saved on the WooCommerce order and appears after the order imports into ShipStation. Test a message near the limit and one that exceeds it.

Include non-ASCII text in your test. Server validation uses byte length, so its count can differ from the number of visible characters.

Troubleshooting

↑ Back to top

If the limit doesn’t change, check that the custom plugin is active and that no other customization changes the same filter. If the message doesn’t reach ShipStation, confirm the order imported and check the connection before changing the filter. To remove the customization, disable the custom plugin or remove the filter and test checkout again.

Questions and support

↑ Back to top

Do you still have questions and need assistance? 

  • Get in touch with a Happiness Engineer via our Help Desk. We provide support for extensions developed by and/or sold on WooCommerce.com, and Jetpack/WordPress.com customers.
  • If you are not a customer, we recommend finding help in the WooCommerce support forum or hiring a Woo Agency Partner. These are trusted agencies with a proven track record of building highly customized, scalable online stores. Learn more about Woo Agency Partners.

Related Products

WooCommerce Shipping is a free label-printing and fulfillment extension built into WooCommerce that lets store owners buy and print USPS,...

Automatically calculate how much sales tax should be collected for WooCommerce orders — by city, country, or...

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.