Enable Downloads in the WP REST API

/** * Adds additional arguments into the post type registration for downloads. * * @param array $download_args The existing array of arguments. * * @return array */ function eddwp_add_rest_for_dls( $download_args ) { $download_args[‘show_in_rest’] = true; $download_args[‘rest_base’] = ‘downloads’; return $download_args;…Continue reading

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 ) ) { return false; } return $notes; } add_filter(…Continue reading

Remove Price

function pw_edd_remove_price( $args ) { $args[‘price’] = ‘no’; return $args; } add_filter( ‘edd_purchase_link_defaults’, ‘pw_edd_remove_price’ );Continue reading

Remove Free Text

function pw_edd_remove_free( $form, $args ) { $form = str_replace( ‘Free – Purchase’, ‘Purchase’ , $form ); return $form; } add_filter( ‘edd_purchase_download_form’, ‘pw_edd_remove_free’, 10, 2 );Continue reading

Enable Comments

function pw_edd_comments() { add_post_type_support( ‘download’, ‘comments’ ); } add_action( ‘init’, ‘pw_edd_comments’, 999 );Continue reading

Exclude downloads from search

function sumobi_download_post_type_args( $download_args ) { $download_args[‘exclude_from_search’] = true; return $download_args; } add_filter( ‘edd_download_post_type_args’, ‘sumobi_download_post_type_args’ );Continue reading

Change Checks to Wire Transfer

/** * Change the word “Check” to “Wire Transfer” on the checkout page and settings pages. * * @since 1.0 * @return array */ function custom_change_checks_to_wire( $gateways ){ $gateways[‘checks’] = array( ‘admin_label’ => ‘Wire Transfer’, ‘checkout_label’ => __( ‘Wire Transfer’,…Continue reading

Move Points Message Below Content

if ( class_exists( ‘EDD_Points_Renderer’ ) ) { global $edd_points_render; remove_action( ‘edd_before_download_content’, array( $edd_points_render, ‘edd_points_message_content’ ), 10 ); add_action( ‘edd_after_download_content’, array( $edd_points_render, ‘edd_points_message_content’ ), 0 ); }Continue reading

Reverse Receivers

function edd_c_reverse_receivers( $receivers, $payment_id ) { $receivers = explode( “\n”, $receivers ); $receivers = implode( “\n”, array_reverse( $receivers ) ); return $receivers; } add_filter( ‘epap_adaptive_receivers’, ‘edd_c_reverse_receivers’, 10, 2 );Continue reading