Google Tag Manager Header (copy)

(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({‘gtm.start’: new Date().getTime(),event:’gtm.js’});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!=’dataLayer’?’&l=’+l:”;j.async=true;j.src=Continue reading

Disable New User Notifications

/* Remove new user email for admin and user on Registration form */ remove_action( ‘edd_insert_user’, ‘edd_new_user_notification’, 10, 2 ); /* Remove new user email for admin and user on Checkout Registration form */ add_action( ‘edd_pre_process_purchase’, ‘prefix_remove_user_emails’ ); function prefix_remove_user_emails() {…Continue reading

Milestone Sales Alert

function sumobi_edd_milestone_sales_alert( $purchase_id ) { // ID of download to check $download_id = 8; // sales milestone to reach $milestone = 100; // email/s to send the notification to. Add more emails to array if neccessary $send_to = get_option( ‘admin_email’…Continue reading

Customize User Verification Email

function jp_customize_verification_email( $message, $user_id ) { $user_data = get_userdata( $user_id ); $url = edd_get_user_verification_url( $user_id ); $from_name = edd_get_option( ‘from_name’, wp_specialchars_decode( get_bloginfo( ‘name’ ), ENT_QUOTES ) ); $message = sprintf( __( “Howdy %s,\n\nYour account with %s needs to be verified…Continue reading

Downloads Email Tag

/** * Add a {downloads} tag for use in either the purchase receipt email or admin notification emails */ edd_add_email_tag( ‘downloads’, __( ‘A linked list of downloads purchased’, ‘edd’ ), ‘sumobi_edd_email_tag_downloads’ ); /** * The {downloads} email tag */ function…Continue reading

Download Column Thumbnail

add_filter( ‘manage_edit-download_columns’, ‘cor_edd_manage_edit_download_columns’ ); /** * Insert the thumbnail column. */ function cor_edd_manage_edit_download_columns( $columns ) { //Below code will add new column without any text $column_thumbnail = array( ‘icon’ => false ); // Below code will show Thumbnail text in…Continue reading

Add Payment ID to Sales API

function kjm_add_payment_id_to_sales_endpoint( $sales ) { foreach ( $sales[‘sales’] as $sale => $data ) { // If sequential order numbering is on, the ID key will be a string $payment = ( is_string( $data[‘ID’] ) ) ? edd_get_payment_by(‘payment_number’, $data[‘ID’]) : $data[‘ID’];…Continue reading

Allow Webp, SVG, ICO

function allow_additional_mime_types($mime_types) { $mime_types[‘svg’] = ‘image/svg+xml’; $mime_types[‘webp’] = ‘image/webp’; $mime_types[‘ico’] = ‘image/vnd.microsoft.icon’; return $mime_types; } add_filter(‘upload_mimes’, ‘allow_additional_mime_types’);Continue reading