Your cart is currently empty!
Setting a different rate for subscription payments
—
by
Hello,
I searched the forum but the only thing relating to this was a few years old.
That being said, is there a way to be able to set a different rate for subscription payments? We would like to be able to offer a 10% rate on the initial purchase but back it down to a 5% rate on the following subscription payments.
Thank you,
JT
Posted in Affiliates Pro
Comments
6 responses to “Setting a different rate for subscription payments”
I just downloaded it a few hours ago. Is it newer than that?
Hello,
The last update was made 15 hour ago from now. To check precisely, you can hover over the rightmost column (that says 15 hours ago in my screenshot) to see when was the latest update in your own time 🙂
Here’s a screenshot to illustrate:
https://pasteboard.co/IqmukI1.png
Cheers,
Denitsa
Hello, Jason,
First, my sincerest apologies for not replying to your thread for so long!
I called in a colleague to develop a custom solution for your case – you can find it here -> https://github.com/geotsiokos/affiliates-formula-custom-subscription-rates
Doownload it as a .zip, install and activate it as you would a regular plugin. As per the readme, you’d need to create a rate under Affiliates > Rates with a Type of Formula, enter c*t or c*s in the Value field and then choose WooCommerce under Integrations. Here t would indicate product line subtotal and s would be the net order subtotal instead.
You can specify your preferred values for the comission given on the initial subscription order and the renewal by editing them in the example_affiliates_formula_variable_crates function.
Here’s the plugin’s documentation page on Rates, if you’d like to take a further look -> http://docs.itthinx.com/document/affiliates-pro/rates/
Let me know if this works for you!
Cheers,
Denitsa
Thanks for getting back to me all the same.
I’m a little confused but I think I have it. I’m just not sure what low rate and high rate are. Is this how I would edit it to have a 10% commission on the initial order and then 5% on subscription payments?
add_filter( ‘affiliates_formula_variable_crates’, ‘example_affiliates_formula_variable_crates’ );
function example_affiliates_formula_variable_crates( $rates ) {
$rates[‘default’] = 0.1;
$rates[‘low_rate’] = 0.5;
$rates[‘high_rate’] = 0.5;
return $rates;
}
Hello again,
That would look like:
add_filter( ‘affiliates_formula_variable_crates’, ‘example_affiliates_formula_variable_crates’ );
function example_affiliates_formula_variable_crates( $rates ) {
$rates[‘default’] = 0.1;
$rates[‘low_rate’] = 0.05;
$rates[‘high_rate’] = 0.1;
return $rates;
}
Essentially, this would mean that the initial purchase of the subscription would give 10% (‘high rate’) commission and the subsequent payments would give 5% (‘low rate’).
You can test the process by creating a test subscription, subscribing via a test affiliate’s link, and then simulating a “subsequent payment” by going to Tools > Scheduled Actions, searching for the subscription’s ID, finding the row with the hook ‘woocommerce_scheduled_subscription_payment’ and the status pending and clicking Run.
The process of manually triggering a subscription payment is described in detail here -> https://docs.woocommerce.com/document/testing-subscription-renewal-payments/
Then, check under Affiliates > Referrals is the commissions match your desired setup.
Keep me posted on the results!
Cheers,
Denitsa
Hey, just an update, we have made some changes to the GitHub repository, so please download the plugin from https://github.com/geotsiokos/affiliates-formula-custom-subscription-rates again to use the latest version 🙂
Cheers,
Denitsa