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 | |
| /** | |
| * Plugin Name: Easy Digital Downloads - Change Purchase Receipt Heading | |
| * Description: Changes the Default Template purchase receipt heading from "Purchase Receipt" to "Download Confirmation". | |
| */ | |
| function jp_filter_email_heading( $headers, $payment_id, $payment_data ) { | |
| EDD()->emails->__set( 'heading', 'Download Confirmation' ); | |
| return $headers; | |
| } |
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 jp_edd_purchase_history_login( $atts, $content = null ) { | |
| if ( is_user_logged_in() ) { | |
| ob_start(); | |
| edd_get_template_part( 'history', 'purchases' ); | |
| return ob_get_clean(); | |
| } else { | |
| extract( shortcode_atts( array( |
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 | |
| // Use this one to change the text and keep the 'download' label | |
| function jp_change_reviews_text() { | |
| return sprintf( 'You must buy this %s to leave a review.', strtolower( edd_get_label_singular() ) ); | |
| } | |
| add_filter( 'edd_reviews_user_logged_out_message', 'jp_change_reviews_text' ); |
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 - Frontend Submissions | |
| * Removes "The Shop of Vendor" text from the vendor archive page title. | |
| */ | |
| function jp_change_fes_shop_title( $title, $vendor ) { | |
| $store_name = EDD_FES()->helper->get_user_meta( 'name_of_store', $vendor ); | |
| if( empty( $store_name ) ) { |
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 jp_custom_profile_information( $author ) { | |
| $website = get_user_meta( $author->ID, 'user_url', true ); | |
| if( ! empty( $website ) ) { | |
| echo '<p class="vendor-url"><a href="' . $website . '">Website</a></p>'; | |
| } | |
| } | |
| add_action( 'marketify_vendor_profile_after_social', 'jp_custom_profile_information' ); |
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 | |
| /* | |
| Plugin Name: Easy Digital Downloads - Shop Front Theme: Remove featured image from single download pages. | |
| */ | |
| function jp_remove_featured_image_single() { | |
| if( is_singular( 'download' ) && has_post_thumbnail() ) { | |
| remove_action( 'shopfront_single_download_image', 'shopfront_single_download_image' ); | |
| } | |
| } | |
| add_action( 'template_redirect', 'jp_remove_featured_image_single' ); |
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 | |
| /* | |
| Plugin Name: Easy Digital Downloads - Sort archive by number of sales | |
| */ | |
| function jp_sort_downloads_archive( $query ) { | |
| if ( is_post_type_archive( 'download' ) && $query->is_main_query() ) { | |
| $query->set( 'meta_key', '_edd_download_sales' ); | |
| $query->set( 'orderby', 'meta_value_num' ); | |
| $query->set( 'order', 'DESC' ); | |
| } |