Title: Inline CSS &amp; wcdn_head Action Hook
Last modified: June 18, 2024

---

# Inline CSS & wcdn_head Action Hook

 *  Resolved [pursuitforjustice](https://wordpress.org/support/users/pursuitforjustice/)
 * (@pursuitforjustice)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/inline-css-wcdn_head-action-hook/)
 * Hello. I enjoy this plugin. However, I am experiencing issues with both inline
   CSS & adding CSS with the **wcdn_head** action hook. Also, I did read the post
   submitted by user pihasurfer about 2 weeks ago regarding the HTML being stripped.
   The HTML is now working. However, it appears that some inline CSS is being stripped.
   For instance, when I add “**display: flex;**” that is removed, but other inline
   CSS will remain, such as “justify-content: center;” Moreover, when I attempt 
   to use the wcdn_head action hook, it doesn’t work. I tried using this hook inside
   the functions.php file & I tried using it with the WPCode plugin, but I wasn’t
   successful. Maybe I’m doing it wrong.
   This is pertaining to the Invoice template.
   I currently do not use the Receipt nor Delivery Notes template._How I’m using
   the action hook._
 *     ```wp-block-code
       <?phpfunction custom_invoice_css(){    ?>    <style>         /* Custom CSS */    </style>    <?php}add_action('wcdn_head', 'custom_invoice_css', 20);?>
       ```
   
 * 
   Below is an example of my CSS coding being stripped. _Before I save my code:_
 *     ```wp-block-code
       <div style="display: flex; flex-wrap: wrap; justify-content: space-evenly; margin: 1rem 0 0;">
       ```
   
 * _After I save my code (display property & value are missing):_
 *     ```wp-block-code
       <div style="flex-wrap: wrap; justify-content: space-evenly; margin: 1rem 0 0;">
       ```
   
 * Any assistance is greatly appreciated!

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [priyankajagtap](https://wordpress.org/support/users/priyankajagtap/)
 * (@priyankajagtap)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/inline-css-wcdn_head-action-hook/#post-17838987)
 * Hi [@pursuitforjustice](https://wordpress.org/support/users/pursuitforjustice/),
   
   I will check this custom code snippet with the development team and will get 
   back to you with an update of the same. I hope that is fine.
 *  Thread Starter [pursuitforjustice](https://wordpress.org/support/users/pursuitforjustice/)
 * (@pursuitforjustice)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/inline-css-wcdn_head-action-hook/#post-17839183)
 * Hi [@priyankajagtap](https://wordpress.org/support/users/priyankajagtap/),
 * That is fine. I appreciate it. Also, I did try different priorities with the 
   hook, such as the following:
 *     ```wp-block-code
       add_action('wcdn_head', 'custom_invoice_css', 20);add_action('wcdn_head', 'custom_invoice_css', 10, 1);add_action('wcdn_head', 'custom_invoice_css', 10, 2);
       ```
   
 *  Plugin Author [priyankajagtap](https://wordpress.org/support/users/priyankajagtap/)
 * (@priyankajagtap)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/inline-css-wcdn_head-action-hook/#post-17843272)
 * Hi [@pursuitforjustice](https://wordpress.org/support/users/pursuitforjustice/),
 * First of all, I apologize for the inconvenience this may have caused to you.
 * Our developer checked this hook at our end and observed that the hook “wcdn_head”
   is working properly. The output of the function code will be shown on the button
   only. The changes done in the code using this hook will not be reflected in the
   PDF and live preview because this hook is not attached to that.
 * If you want to apply that hook output in the PDF then you can add the styling
   with the important! tag in the “style.css” file located at the below-mentioned
   path. So the changes will be applied in the PDF also.
   wp-content / plugins / 
   woocommerce-delivery-notes / templates / pdf / default
 * Also, can you please provide the full custom code that you are adding to the “
   functions.php” file? So our development team can check the code snippet and investigate
   why it is not working for you. We will check and let you know the update of the
   same.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Inline CSS & wcdn_head Action Hook’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce-delivery-notes/assets/icon-256x256.jpg?rev=2829362)
 * [Print Invoice & Delivery Notes for WooCommerce](https://wordpress.org/plugins/woocommerce-delivery-notes/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce-delivery-notes/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce-delivery-notes/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce-delivery-notes/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce-delivery-notes/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce-delivery-notes/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [priyankajagtap](https://wordpress.org/support/users/priyankajagtap/)
 * Last activity: [1 year, 11 months ago](https://wordpress.org/support/topic/inline-css-wcdn_head-action-hook/#post-17843272)
 * Status: resolved