Title: Problem with add shortcode
Last modified: February 9, 2021

---

# Problem with add shortcode

 *  [inomi13](https://wordpress.org/support/users/inomi13/)
 * (@inomi13)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/problem-with-add-shortcode/)
 * I tasting your plugin but i can’t add order id with my watermark. Can you explain
   me how can i do it? What snipped code i should add to function.php ?

Viewing 1 replies (of 1 total)

 *  Plugin Author [Little Package](https://wordpress.org/support/users/littlepackage/)
 * (@littlepackage)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/problem-with-add-shortcode/#post-14026556)
 * Hi [@inomi13](https://wordpress.org/support/users/inomi13/)
 * Thanks for getting in touch and for using the free version of WaterWoo.
 *     ```
       function fetch_custom_checkout_field( $input, $order_id, $product_id ) {
   
           // when we find [ORDER_ID] in a watermark, replace it with the order CPF
           $input = preg_replace( '/\[ORDER_ID\]/', $order_id, $input );
   
           return $input;
       }
       add_filter( 'wwpdf_filter_overlay', 'fetch_custom_checkout_field', 10, 3 );
       add_filter( 'wwpdf_filter_footer', 'fetch_custom_checkout_field', 10, 3 );
       ```
   
 * Use **[ORDER_ID]** as your shortcode. Put this code in your child theme functions.
   php file or insert it using the Code Snippets plugin if you don’t know how to
   edit PHP files.
 * This code was a really easy “_gimme_” based on [code on our blog](https://web.little-package.com/2018/10/06/brazil-ecommerce-watermark-cpf-pdf/),
   so I shared it for you. Please keep in mind, though, any further troubleshooting
   or customization of free plugins will be up to you. My plugins are all offered
   as-is, particularly the free ones. Many people find the plugin doesn’t do *exactly*
   what they want/need, but with some work, they figure out how to customize using
   included filter/action hooks. I do not offer free customization of them, nor 
   do I currently have time to contract my services. You can ask for further help
   with this code at jobs.wordpress.net and I also recommend codeable.io.

Viewing 1 replies (of 1 total)

The topic ‘Problem with add shortcode’ is closed to new replies.

 * ![](https://ps.w.org/waterwoo-pdf/assets/icon.svg?rev=3301838)
 * [PDF Ink Lite - Free PDF Watermark & Password Protection](https://wordpress.org/plugins/waterwoo-pdf/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/waterwoo-pdf/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/waterwoo-pdf/)
 * [Active Topics](https://wordpress.org/support/plugin/waterwoo-pdf/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/waterwoo-pdf/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/waterwoo-pdf/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Little Package](https://wordpress.org/support/users/littlepackage/)
 * Last activity: [5 years, 3 months ago](https://wordpress.org/support/topic/problem-with-add-shortcode/#post-14026556)
 * Status: not resolved