Commissions payment_id email tag

function pj_eddc_add_payment_id_email_template_tag( $message, $user_id, $commission_amount, $rate, $download_id, $commission_id ){ //Get the payment Id $payment_id = get_post_meta( $commission_id, ‘_edd_commission_payment_id’, true ); $message = str_replace( ‘{payment_id}’, $payment_id, $message ); return $message; } add_filter( ‘eddc_sale_alert_email’, ‘pj_eddc_add_payment_id_email_template_tag’, 10, 6 );Continue reading

Show Invoice for Refunded

function pw_edd_pdf_invoices_for_refunded( $show_invoice, $payment_id ) { $payment = get_post( $payment_id ); $status = edd_get_payment_status( $payment ); if( ‘refunded’ === $status ) { $show_invoice = true; } return $show_invoice; } add_filter( ‘eddpdfi_is_invoice_link_allowed’, ‘pw_edd_pdf_invoices_for_refunded’, 10, 2 );Continue reading

Show Invoice for Pending

function pw_edd_pdf_invoices_for_pending( $show_invoice, $payment_id ) { $payment = get_post( $payment_id ); $status = edd_get_payment_status( $payment ); if( ‘pending’ === $status ) { $show_invoice = true; } return $show_invoice; } add_filter( ‘eddpdfi_is_invoice_link_allowed’, ‘pw_edd_pdf_invoices_for_pending’, 10, 2 );Continue reading

Remove AggregateRating and Reviews Schema

add_filter( ‘aioseo_schema_output’, ‘product_schema_aggregate_reviews’ ); function product_schema_aggregate_reviews( $schema ) { foreach ( $schema as &$schemaItem ) { if ( ‘Product’ === $schemaItem[‘@type’] ) { unset ($schemaItem[‘aggregateRating’]); unset ($schemaItem[‘review’]); } } return $schema; }Continue reading

Continue Shopping Button

add_action( ‘edd_cart_footer_buttons’, ‘ck_edd_continue_shopping_button’, 1 ); function ck_edd_continue_shopping_button() { $color = edd_get_option( ‘checkout_color’, ‘green’ ); $color = ( $color == ‘inherit’ ) ? ” : $color; ?> “>Continue reading

Modify User Role on Checkout

function pw_edd_customer_user_role( $user_args, $user_data ) { // Set the role to the role you wish customers to have $user_args[‘role’] = ‘customer’; return $user_args; } add_filter( ‘edd_insert_user_args’, ‘pw_edd_customer_user_role’, 10, 2 );Continue reading

Custom Terms Page

/** * Change $page_id to the ID of your terms page below */ function sumobi_edd_terms_agreement() { global $edd_options; if ( isset( $edd_options[‘show_agree_to_terms’] ) ) : ?>Continue reading