Jump to content

Generate a stylesheet into a Woocommerce plugin


meowmix

Recommended Posts

Hello!

 

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! 

class-wc-customer-order-xml-export-suite-writer.php

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.