I'm trying to integrate the Reseller Ratings code into my Woocommerce "Thank you" page.
The code requires that the email and order number be passed to the script, but nothing I enter works.
Here's an example of the code:
<script type="text/javascript">
var _rrES = {
seller_id: XXXXXXX,
email: "customer@home.com",
invoice: "INVOICE NUMBER"};
(function() {
var s=document.createElement('script');s.type='text/javascript';s.async=true;
s.src="https://www.resellerratings.com/popup/include/popup.js";var ss=document.getElementsByTagName('script')[0];
ss.parentNode.insertBefore(s,ss);
})();
</script>
I've tried various things but this is my latest attempt which does not work either.
<script type="text/javascript">
var _rrES = {
seller_id: XXXXXXXX,
email: "<?php echo $current_user->user_email; ?>",
invoice: "<?php echo $order->get_order_number(); ?>"};
(function() {
var s=document.createElement('script');s.type='text/javascript';s.async=true;
s.src="https://www.resellerratings.com/popup/include/popup.js";var ss=document.getElementsByTagName('script')[0];
ss.parentNode.insertBefore(s,ss);
})();
</script>
Can anyone help me get the right variables into that code please!