Skip to content

Instantly share code, notes, and snippets.

@joshfeck joshfeck/shareasale_ee3.php Secret
Created Jun 22, 2017

Embed
What would you like to do?
<?php
//* Please do NOT include the opening php tag, except of course if you're starting with a blank file
function espresso_track_successful_sharasale($payment_data){
$amount = $payment_data['total_cost'];
$tracking = $payment_data['txn_id'];
$url = 'https://shareasale.com/sale.cfm?';
$url .= 'amount=' . $amount . '&';
$url .= 'tracking=' . $tracking . '&';
$url .= 'transtype=sale&merchantID=73676';
$html = '<img src="' . $url . '" width="1" height="1">';
print($html);
}
add_action('action_hook_espresso_track_successful_sale','espresso_track_successful_sharasale');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.