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 // DO NOT COPY THIS LINE | |
| function custom_edd_stripe_new_card_form() { | |
| ?> | |
| <p id="edd-card-number-wrap"> | |
| <label for="card_number" class="edd-label"> | |
| <?php _e( 'Card Number', 'edds' ); ?> | |
| <span class="edd-required-indicator">*</span> | |
| <span class="card-type"></span> | |
| </label> |
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 // DO NOT COPY THIS LINE | |
| function sd_remove_purchase_form_qty( $output ) { | |
| $output = ''; | |
| return $output; | |
| } | |
| add_filter( 'edd_purchase_form_quantity_input', 'sd_remove_purchase_form_qty' ); |
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 // DO NOT COPY THIS LINE | |
| function sd_edd_external_products_product_links( $purchase_form, $args ) { | |
| if( $url = get_post_meta( $args['download_id'], '_edd_external_product_url', true ) ) { | |
| $label = get_post_meta( $args['download_id'], '_edd_external_product_button', true ); | |
| $purchase_form = '<div class="edd_download_purchase_form">'; | |
| $purchase_form .= '<div class="edd_purchase_submit_wrapper">'; | |
| $purchase_form .= sprintf( |
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 // DO NOT COPY THIS LINE | |
| function pw_edd_purchase_form_required_fields( $required_fields ) { | |
| unset( $required_fields['edd_first'] ); | |
| return $required_fields; | |
| } | |
| add_filter( 'edd_purchase_form_required_fields', 'pw_edd_purchase_form_required_fields' ); |
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
| // Checkout form login toggle | |
| $('.edd-checkout-show-login-form').on('click',function(e){ | |
| e.preventDefault(); | |
| $(this).parents( ".edd-show-login-wrap" ).siblings( "#edd_login_fields" ).show(); | |
| $( "#edd_login_fields #edd_user_login" ).focus(); | |
| }); |
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 | |
| /** | |
| * Place checkout login form behind a toggle link | |
| */ | |
| function eddwp_checkout_login_toggle() { | |
| if ( is_user_logged_in() ) { | |
| return; | |
| } | |
| ?> |
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 // DO NOT COPY THIS LINE | |
| // add discount code Software Licensing renewal email {renewal_link} tag | |
| function edd_sl_renewal_link_discount( $url ) { | |
| $url = $url . '&discount=DISCOUNTCODE'; | |
| return $url; | |
| } | |
| add_filter( 'edd_sl_renewal_link', 'edd_sl_renewal_link_discount' ); |
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 // DO NOT COPY THIS LINE | |
| /* | |
| * This snippet forces the billing address to always be collected at checkout | |
| */ | |
| function pw_edd_force_billing_address() { | |
| if( ! did_action( 'edd_after_cc_fields', 'edd_default_cc_address_fields' ) ) { | |
| edd_default_cc_address_fields(); | |
| } | |
| } |
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
| Find this line (twice) | |
| <?php echo apply_filters( 'edd_downloads_excerpt', wp_trim_words( get_post_field( 'post_excerpt', get_the_ID() ), $excerpt_length ) ); ?> | |
| Replace it with this line (again, twice) | |
| <?php echo apply_filters( 'edd_downloads_excerpt', wp_trim_words( get_post_field( 'post_excerpt', get_the_ID() ), $excerpt_length, '' ) ); ?> |
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 // DO NOT COPY THIS LINE | |
| function sd_paypal_locale_code( $paypal_args ) { | |
| // replace fr_XC with the Locale Code you need | |
| // https://developer.paypal.com/docs/classic/api/locale_codes/#supported-locale-codes | |
| $paypal_args['lc'] = 'fr_XC'; | |
| return $paypal_args; | |
| } | |
| add_filter( 'edd_paypal_redirect_args', 'sd_paypal_locale_code' ); |