Grant points to the referrer based on a fixed percentage of the amount spent by his/her friend. (points & rewards plugin)
If you are using WooCommerce Points & Rewards plugin, and you want to grant points to the referrer based on a fixed percentage of the amount spent by his/her friend, add this code to your function.php file and change 0.01 which is 1% to the amount you want. In the example below if a friend buys something worth 100$, a user will receive 1$ worth of points.
add_filter( 'gens_raf_points_amount', 'change_points_amount', 10, 2); function change_points_amount($points,$order){ $points = intval($order->get_total() * 0.01); return $points; } add_filter( 'gens_raf_generate_coupon', '__return_false' );