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 | |
function affwp_one_time_flat_rate_commission( $args, $amount, $order_id, $description, $affiliate_id, $visit_id, $products, $context ) { | |
if ( ! function_exists( 'affiliate_wp' ) ) { | |
return $args; | |
} | |
if ( 'flat' === affwp_get_affiliate_rate_type( $affiliate_id ) ) { | |
$args['amount'] = (float) affwp_get_affiliate_rate( $affiliate_id ); |
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 | |
function sumobi_edd_auto_register_filter_password_length( $args ) { | |
// change from the default of 32 to 10 | |
$args['user_pass'] = wp_generate_password( 10 ); | |
return $args; | |
} | |
add_filter( 'edd_auto_register_insert_user_args', 'sumobi_edd_auto_register_filter_password_length' ); |
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 | |
function affwp_edd_block_commission_unless_purchased( $referral_amount, $affiliate_id, $amount, $reference, $product_id ) { | |
// get referring affiliate ID | |
$affiliate_id = affiliate_wp()->tracking->get_affiliate_id(); | |
// get user ID of referring affiliate | |
$user_id = affwp_get_affiliate_user_id( $affiliate_id ); |
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 | |
$info = affiliatewp_affiliate_info()->functions; | |
$name = $info->get_affiliate_name(); | |
$email = $info->get_affiliate_email(); | |
$website = $info->get_affiliate_website(); | |
$bio = $info->get_affiliate_bio(); | |
$gravatar = $info->get_affiliate_gravatar(); | |
$twitter = $info->get_twitter_username(); |
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 | |
function affwp_custom_force_frontend_scripts() { | |
if ( is_page( 123 ) ) { | |
return true; | |
} | |
} | |
add_filter( 'affwp_force_frontend_scripts', 'affwp_custom_force_frontend_scripts' ); |
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
add_filter( 'edd_ppe_email_heading', '__return_true' ); |
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
function affwp_custom_op_login_redirect( $return, $vars ) { | |
$user_id = $vars['user_id']; | |
if ( function_exists( 'affwp_is_affiliate' ) && affwp_is_affiliate( $user_id ) ) { | |
$return = false; | |
} | |
return $return; | |
} |
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
function affwp_opi_add_tracking_shortcode() { | |
// this can be the page ID, page slug, or page title. Page title is shown below | |
if ( is_page( 'Your Success Page' ) ) { | |
echo do_shortcode( '[affiliate_conversion_script description="Your Description" amount="100"]' ); | |
} | |
// another "thanks" page using a page ID | |
if ( is_page( 50 ) ) { | |
echo do_shortcode( '[affiliate_conversion_script description="A different description" amount="200"]' ); |
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
/** | |
* Fix styling in the Marketify theme | |
*/ | |
function sumobi_edd_csau_fix_styles() { | |
if ( ! ( is_singular( 'download' ) || edd_is_checkout() ) ) { | |
return; | |
} | |
?> | |
<style> |
NewerOlder