WP Manifestindependent plugin directory
manifest / ecommerce / woocommerce-affiliate-future-integration

WooCommerce Affiliate Future Integration

Affiliate Future integration with Woocommerce, allowing shop owners to track sales via tracking on the Woocommerce Order Received page

★ 0stars
1.0.0latest · 10 years ago

Install

Download source zip No release zip yet

This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/creativelittledots/woocommerce-affiliate-future-integration/archive/refs/heads/master.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

WooCommerce Affiliate Future Integration

Affiliate Future integration with Woocommerce, allowing shop owners to track sales via tracking on the Woocommerce Order Received page

Simply set you your Affiliate Future settings in WooCommerce > Settings > Integrations > Affiliate Future and all of the required order information will back tracked back to your Affiliate Future account.

Currently using the AFSaleV2 facility, there is a filter provided that you can use called wc_af_sale_v2_query_args to customise the parameters in the URL should you need to customise some the parameters:

$url = add_query_arg(apply_filters('wc_af_sale_v2_query_args', array(
    'orderID' => $order->get_order_number(),
    'orderValue' => $af_settings['total_type'] === 'total' ? round($order->get_total(), 2) : round($order->get_subtotal(), 2),
    'merchant' => $merchant_id,
    'offlineCode' => '',
    'voucher' => implode(',', $order->get_used_coupons()),
    'payoutCodes' => '',
    'products' => '',
    'r' => '',
    'img' => 'yes'
), $af_settings, $order), '//scripts.affiliatefuture.com/AFSaleV2.asp');

Which can be used in functions.php like this:

add_filter( 'wc_af_sale_v2_query_args', 'custom_af_args', 10, 3 );

function custom_af_args( $args, $af_settings, $order ) {

    return array_merge($args, array(
        'some_arbitrary' => 'text'
    ));

    // results in a request to http://scripts.affiliatefuture.com/AFSaleV2.asp?orderID={{order_id}}&orderValue={{order_value}}&merchant={{merchant_id}}&voucher={{voucher_codes}}payoutCodes=&offlineCode=&r=&img=yes&some_arbitrary=text

}

Installation

  1. Upload the plugin to the /wp-content/plugins/ directory
  2. Activate the plugin through the 'Plugins' menu in WordPress

Requirements

An account with Affiliate Future

PHP 5.4+

Wordpress 4+

WooCommerce 2.5+

License

GNU General Public License v3.0

Releases

1 release.

Tag
Published
1.0.0 latest
Sep 6, 2016 10 years ago

These releases are tags only. The author does not attach a packaged zip, so there are no download counts to report.