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_marketify_edd_favorites() { | |
| // remove the button from the default position. Marketify adds there's further below | |
| remove_action( 'edd_purchase_link_top', 'edd_favorites_load_link' ); | |
| // remove the wish list button from Marketify's custom location | |
| remove_action( 'marketify_single_download_content_after', 'edd_wl_load_wish_list_link' ); |
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_download_tag_args( $tag_labels ) { | |
| $slug = defined( 'EDD_SLUG' ) ? EDD_SLUG : 'downloads'; | |
| // modify the "the-new-category-label" below to your liking | |
| $tag_labels['rewrite'] = array('slug' => $slug . '/the-new-tag-label', 'with_front' => false, 'hierarchical' => true ); | |
| return $tag_labels; | |
| } |
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 link through to user's profile screen from the reference column of the referrals page | |
| */ | |
| function affwp_custom_wc_referrals_user_link( $reference, $referral ) { | |
| if ( ! ( 'woocommerce' == $referral->context || class_exists( 'WC_Order' ) ) ) { | |
| return $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 | |
| /** | |
| * Easy Digital Downloads - Add the customer's username to the payment's "Customer Details" section and link through to their profile | |
| */ | |
| function sumobi_edd_customer_details_username( $payment_id ) { | |
| $user_info = edd_get_payment_meta_user_info( $payment_id ); | |
| $customer_id = $user_info['id']; | |
| if ( ! $customer_id ) { |
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 | |
| /** | |
| * Send the affiliate the application accepted email when manually adding an affiliate | |
| */ | |
| function affwp_custom_process_add_affiliate( $data ) { | |
| if ( empty( $data['user_id'] ) ) { | |
| return 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 | |
| /** | |
| * Append more information to the application success email message | |
| */ | |
| function affwp_custom_application_accepted_message( $message, $args ) { | |
| $message = sprintf( __( "Congratulations %s!\n\n", "affiliate-wp" ), affiliate_wp()->affiliates->get_affiliate_name( $args['affiliate_id'] ) ); | |
| $message .= sprintf( __( "Your affiliate application on %s has been accepted!\n\n", "affiliate-wp" ), home_url() ); | |
| $message .= sprintf( __( "Log into your affiliate area at %s\n\n", "affiliate-wp" ), get_permalink( affiliate_wp()->settings->get( 'affiliates_page' ) ) ); |
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_shopfront_remove_logo_at_checkout() { | |
| if ( edd_is_checkout() ) { | |
| add_filter( 'shopfront_header_output', 'sumobi_get_checkout_header' ); | |
| } | |
| } | |
| add_action( 'template_redirect', 'sumobi_shopfront_remove_logo_at_checkout', 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 | |
| /** | |
| * Remove product notes for specific downloads | |
| */ | |
| function sumobi_edd_remove_product_notes( $notes, $download_id ) { | |
| // enter the download IDs you'd like to exclude into this array | |
| $downloads_to_exclude = array( 509, 104, 435 ); | |
| if ( in_array( $download_id, $downloads_to_exclude ) ) { |
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_required_fields( $required_fields ) { | |
| unset( $required_fields['affwp_user_url'] ); | |
| return $required_fields; | |
| } | |
| add_filter( 'affwp_register_required_fields', 'affwp_custom_required_fields' ); |
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 | |
| /** | |
| * Disable referrals on specific product categories in Easy Digital Downloads | |
| */ | |
| function affwp_custom_edd_disable_referrals_on_categories( $referral_amount, $affiliate_id, $amount, $reference, $product_id ) { | |
| // Array of categories to disable referrals for. Separate by a comma and use either the term name, term_id, or slug | |
| $disabled_categories = array( 'category-one', 5 ); |