Jump to content
Sign in to follow this  

Generate a stylesheet into a Woocommerce plugin

Recommended Posts



I'm trying to tweak a woocommerce application that generate orders in an XML format. I've been trying to add a stylesheet declaration but I can't seem to figure out what I'm doing wrong (keep in mind that I'm self taught).


When exporting the XML file, I'd like this to be right under the XML version declaration : 


<?xml-stylesheet type="text/xsl" href="commande.xsl"?>


I have attached the PHP file that I'm trying to tweak.


So far I've tried to add :

$xslt $xml->createProcessingInstruction('xml-stylesheet''type="text/xsl" href="base.xsl"');


but that didn't work. I've been searching for 2 days and I can't seem to solve this. Perhaps someone can point me in the right direction as to where I can find my answer or what I'd need to learn in order to fully understand how this works?


Thank you! 


Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.