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.<?php
function 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:<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):
<div style="flex-wrap: wrap; justify-content: space-evenly; margin: 1rem 0 0;">
Any assistance is greatly appreciated!
- You must be logged in to reply to this topic.