Custom Cart Expiration

/* * Sets the cart expiration to 48 hours */ function pw_edd_set_cart_expiration( $seconds ) { return 172800; // 48 hours in seconds } add_filter( ‘wp_session_expiration’,’pw_edd_set_cart_expiration’, 999990 );Continue reading

Force account creation by cart total

function sumobi_edd_force_account_creation_by_cart_total( $ret ) { // enter the cart total amount that should force account creation $limit = 100; // get the cart total $cart_total = edd_get_cart_total(); if ( $cart_total >= $limit ) { // if the cart total is…Continue reading

Billing Address Email Tag – Actual Country Name

function pj_edd_billing_address_tag( $payment_id ) { edd_remove_email_tag( ‘billing_address’ ); edd_add_email_tag( ‘billing_address’, __( ‘The buyer\’s billing address’, ‘easy-digital-downloads’ ), ‘pj_edd_billing_address_tag_callback’ ); } add_action( ‘edd_add_email_tags’, ‘pj_edd_billing_address_tag’, 99 ); function pj_edd_billing_address_tag_callback( $payment_id ) { $user_info = edd_get_payment_meta_user_info( $payment_id ); $user_address = ! empty( $user_info[‘address’]…Continue reading

Add PDF to purchase receipt

/** * * @param array $attachments required Any existing attachments * @param int $payment_id optional ID of the current payment * @param array $payment_data optional The remaining payment data * @return array $attachments Now our attachment is added */ function…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

MemberPress: Remove State Text Field

function mepr_remove_state_field() { global $post; $mepr_options = MeprOptions::fetch(); $is_product_page = ( false !== ( $prd = MeprProduct::is_product_page($post) ) ); if( $mepr_options->global_styles || $is_product_page ) { ?>Continue reading

Move Jump to Recipe above featured image in Genesis

/** * Ensures the “Jump to Recipe” button is added above the featured image. */ add_action( ‘init’, function(){ if ( method_exists( ‘Tasty_RecipesShortcodes’, ‘filter_the_content_late’ ) ) { remove_filter( ‘the_content’, array( ‘Tasty_RecipesShortcodes’, ‘filter_the_content_late’ ), 100 ); add_action( ‘genesis_before_entry_content’, function() { echo Tasty_RecipesShortcodes::filter_the_content_late(…Continue reading

Move Jump to Recipe above featured image

/** * Ensures the “Jump to Recipe” button is added to the content really late. */ add_action( ‘init’, function() { if ( method_exists( ‘Tasty_RecipesShortcodes’, ‘filter_the_content_late’ ) ) { remove_filter( ‘the_content’, array( ‘Tasty_RecipesShortcodes’, ‘filter_the_content_late’ ), 100 ); add_filter( ‘the_content’, array( ‘Tasty_RecipesShortcodes’,…Continue reading