Reputation: 11
I spent already few hours trying to figure out what funcitons i need to put in this script for a affilation platform:
<iframe height='1' width='1' scrolling='no' marginheight='0' marginwidth='0' frameborder='0' src='https://affilation.com/salecheck?amount=**ADD_SALE_VALUE**&campaign_unique=CAMPAIGN_UNIQUE&confirm=CONFIRM&description=**ADD_DESCRIPTION**&transaction_id=**ADD_TRANSACTION_ID**'></iframe>
ADD_SALE_VALUE: total value of the sale. The amount reported must not include VAT ADD_DESCRIPTION: the name of all the products that have been purchased, URL-encoded. ADD_TRANSACTION_ID: the order id, in your platform, URL-encoded.
I've put for transaction_id for example $order->get_order_number() $order->id order->get_id()
I'm running out of ideeas.
Upvotes: 0
Views: 106
Reputation: 154
Use hook 'woocommerce_thankyou' to add this code only on thank you page after checkout. Then in same script get order informations and replace values.
Like this http://hookr.io/actions/woocommerce_thankyou/
You can use $order = wc_get_order($order_id); then over $order get other details.
Upvotes: 0