[Refer A Friend] Programatically get a user's referral coupon/link
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$user_id = 1; | |
$advocate = \AutomateWoo\Referrals\Advocate_Factory::get( $user_id ); | |
// Retrieve or generate a shareable referral coupon (coupon sharing only) | |
$advocate->get_shareable_coupon(); | |
// Retrieve or generate a shareable referral link (link sharing only) | |
$advocate->get_shareable_link(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment