This file contains hidden or 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
remove_action('wp_login', 'c_ws_plugin__s2member_login_redirects::login_redirect', 10, 2); |
This file contains hidden or 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 echo edd_format_amount( edd_get_total_sales(), false ); ?> |
This file contains hidden or 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 | |
/** | |
* Add a specific download to the cart if not already there | |
*/ | |
function sumobi_edd_add_download_to_cart_if_empty() { | |
$download_id = 123; | |
$cart = function_exists( 'edd_get_cart_contents' ) ? edd_get_cart_contents() : false; | |
This file contains hidden or 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_per_product_referral_amounts_based_on_quantity( $referral_amount, $affiliate_id, $amount, $reference, $product_id ) { | |
// product to find | |
$product_to_find = 6018; | |
// look at the downloads purchased | |
$downloads = edd_get_payment_meta_downloads( $reference ); |
This file contains hidden or 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_csau_move_cross_sells_at_checkout() { | |
// remove cross-sells from after the product listing at checkout | |
remove_action( 'edd_after_checkout_cart', 'edd_csau_display_on_checkout_page' ); | |
// add the cross-sells before the product listing at checkout | |
add_action( 'edd_before_checkout_cart', 'edd_csau_display_on_checkout_page' ); | |
} | |
add_action( 'template_redirect', 'sumobi_edd_csau_move_cross_sells_at_checkout' ); |
This file contains hidden or 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 | |
remove_filter( 'the_content', 'edd_csau_single_download_upsells', 100 ); |
This file contains hidden or 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_csau_deregister_styles() { | |
wp_deregister_style( 'edd-csau-css' ); | |
} | |
add_action( 'wp_enqueue_scripts', 'sumobi_edd_csau_deregister_styles', 20 ); |
This file contains hidden or 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 | |
if ( function_exists( 'affiliate_wp' ) ) { | |
remove_action( 'affwp_set_affiliate_status', array( affiliate_wp()->emails, 'notify_on_approval' ), 10, 3 ); | |
} |
This file contains hidden or 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 | |
// remove original shortcode | |
remove_shortcode( 'affiliate_referral_url' ); | |
/** | |
* Add our new shortcode which returns the affiliate referral URL in a site.com/ref/username format | |
*/ | |
function affwp_custom_referral_url_shortcode( $atts, $content = null ) { |
This file contains hidden or 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_format_rub_currency( $formatted, $amount, $decimals, $decimal_sep, $thousands_sep ) { | |
$decimals = 0; | |
$thousands_sep = ''; | |
$formatted = number_format( $amount, $decimals, $decimal_sep, $thousands_sep ); | |
return $formatted; |