From 51d4d95f409b362023daeb0bd1c91c2939f0ee9f Mon Sep 17 00:00:00 2001 From: matty0501 <17788098+matty0501@users.noreply.github.com> Date: Tue, 1 Apr 2025 07:44:33 +0100 Subject: [PATCH] `gpi-enable-wpml-for-custom-messages.php`: Added usage instructions. --- gp-inventory/gpi-enable-wpml-for-custom-messages.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/gp-inventory/gpi-enable-wpml-for-custom-messages.php b/gp-inventory/gpi-enable-wpml-for-custom-messages.php index acf66fc18..59a1dfdd7 100644 --- a/gp-inventory/gpi-enable-wpml-for-custom-messages.php +++ b/gp-inventory/gpi-enable-wpml-for-custom-messages.php @@ -2,6 +2,15 @@ /** * Gravity Perks // Inventory // WPML Support for Custom Inventory Messages * https://gravitywiz.com/documentation/gravity-forms-inventory/ + * + * Instructions + * + * 1. Install the snippet. + * https://gravitywiz.com/documentation/how-do-i-install-a-snippet/ + * + * 2. View the form on the frontend or via the previewer. Viewing the form registers the custom messages with WPML. + * + * 3. Navigate to WPML > String Translation in wp-admin, where the strings will be available to translate. */ add_filter( 'gform_pre_render', function( $form ) { if ( ! function_exists( 'icl_register_string' ) || ! function_exists( 'gp_inventory' ) ) {