installed plugin Easy Digital Downloads
version 3.1.0.3
This commit is contained in:
@ -0,0 +1,111 @@
|
||||
<?php use EDD\Blocks\Functions; ?>
|
||||
<fieldset id="edd_cc_address" class="edd-blocks-form cc-address">
|
||||
<legend><?php esc_html_e( 'Billing Address', 'easy-digital-downloads' ); ?></legend>
|
||||
<?php do_action( 'edd_cc_billing_top' ); ?>
|
||||
<div id="edd-card-country-wrap" class="edd-blocks-form__group edd-blocks-form__group-country">
|
||||
<label for="billing_country" class="edd-label">
|
||||
<?php
|
||||
esc_html_e( 'Country', 'easy-digital-downloads' );
|
||||
if ( edd_field_is_required( 'billing_country' ) ) {
|
||||
echo EDD()->html->show_required();
|
||||
}
|
||||
?>
|
||||
</label>
|
||||
<select name="billing_country" id="billing_country" data-nonce="<?php echo esc_attr( wp_create_nonce( 'edd-country-field-nonce' ) ); ?>" class="<?php echo esc_attr( implode( ' ', Functions\get_input_classes( 'billing_country', array( 'edd-select' ) ) ) ); ?>"<?php Functions\mark_field_required( 'billing_country' ); ?>>
|
||||
<?php
|
||||
$selected_country = edd_get_shop_country();
|
||||
|
||||
if ( ! empty( $customer['address']['country'] ) && '*' !== $customer['address']['country'] ) {
|
||||
$selected_country = $customer['address']['country'];
|
||||
}
|
||||
|
||||
$countries = edd_get_country_list();
|
||||
foreach ( $countries as $country_code => $country ) {
|
||||
echo '<option value="' . esc_attr( $country_code ) . '"' . selected( $country_code, $selected_country, false ) . '>' . esc_html( $country ) . '</option>';
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
<div id="edd-card-address-wrap" class="edd-blocks-form__group edd-blocks-form__group-address">
|
||||
<label for="card_address" class="edd-label">
|
||||
<?php
|
||||
esc_html_e( 'Address', 'easy-digital-downloads' );
|
||||
if ( edd_field_is_required( 'card_address' ) ) {
|
||||
echo EDD()->html->show_required();
|
||||
}
|
||||
?>
|
||||
</label>
|
||||
<input type="text" id="card_address" name="card_address" class="<?php echo esc_attr( implode( ' ', Functions\get_input_classes( 'card_address', array( 'edd-input' ) ) ) ); ?>" placeholder="<?php esc_html_e( 'Address line 1', 'easy-digital-downloads' ); ?>" value="<?php echo esc_attr( $customer['address']['line1'] ); ?>"<?php Functions\mark_field_required( 'card_address' ); ?>/>
|
||||
</div>
|
||||
<div id="edd-card-address-2-wrap" class="edd-blocks-form__group edd-blocks-form__group-address2">
|
||||
<label for="card_address_2" class="edd-label">
|
||||
<?php
|
||||
esc_html_e( 'Address Line 2', 'easy-digital-downloads' );
|
||||
if ( edd_field_is_required( 'card_address_2' ) ) {
|
||||
echo EDD()->html->show_required();
|
||||
}
|
||||
?>
|
||||
</label>
|
||||
<input type="text" id="card_address_2" name="card_address_2" class="<?php echo esc_attr( implode( ' ', Functions\get_input_classes( 'card_address_2', array( 'edd-input' ) ) ) ); ?>" placeholder="<?php esc_html_e( 'Address line 2', 'easy-digital-downloads' ); ?>" value="<?php echo esc_attr( $customer['address']['line2'] ); ?>"<?php Functions\mark_field_required( 'card_address_2' ); ?>/>
|
||||
</div>
|
||||
<div id="edd-card-city-wrap" class="edd-blocks-form__group edd-blocks-form__group-city">
|
||||
<label for="card_city" class="edd-label">
|
||||
<?php
|
||||
esc_html_e( 'City', 'easy-digital-downloads' );
|
||||
if ( edd_field_is_required( 'card_city' ) ) {
|
||||
echo EDD()->html->show_required();
|
||||
}
|
||||
?>
|
||||
</label>
|
||||
<input type="text" id="card_city" name="card_city" class="<?php echo esc_attr( implode( ' ', Functions\get_input_classes( 'card_city', array( 'edd-input' ) ) ) ); ?>" placeholder="<?php esc_html_e( 'City', 'easy-digital-downloads' ); ?>" value="<?php echo esc_attr( $customer['address']['city'] ); ?>"<?php Functions\mark_field_required( 'card_city' ); ?>/>
|
||||
</div>
|
||||
<div class="edd-blocks-form__halves">
|
||||
<div id="edd-card-state-wrap" class="edd-blocks-form__group edd-blocks-form__group-state">
|
||||
<label for="card_state" class="edd-label">
|
||||
<?php
|
||||
esc_html_e( 'State/Province', 'easy-digital-downloads' );
|
||||
if ( edd_field_is_required( 'card_state' ) ) {
|
||||
echo EDD()->html->show_required();
|
||||
}
|
||||
?>
|
||||
</label>
|
||||
<?php
|
||||
$selected_state = edd_get_shop_state();
|
||||
$states = edd_get_shop_states( $selected_country );
|
||||
|
||||
if ( ! empty( $customer['address']['state'] ) ) {
|
||||
$selected_state = $customer['address']['state'];
|
||||
}
|
||||
|
||||
if ( ! empty( $states ) ) :
|
||||
?>
|
||||
<select name="card_state" id="card_state" class="<?php echo esc_attr( implode( ' ', Functions\get_input_classes( 'card_state', array( 'edd-select' ) ) ) ); ?>"<?php Functions\mark_field_required( 'card_state' ); ?>>
|
||||
<?php
|
||||
foreach ( $states as $state_code => $state ) {
|
||||
echo '<option value="' . esc_attr( $state_code ) . '"' . selected( $state_code, $selected_state, false ) . '>' . esc_html( $state ) . '</option>';
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
<?php
|
||||
else :
|
||||
$customer_state = ! empty( $customer['address']['state'] ) ? $customer['address']['state'] : '';
|
||||
?>
|
||||
<input type="text" name="card_state" id="card_state" class="<?php echo esc_attr( implode( ' ', Functions\get_input_classes( 'card_state', array( 'edd-input' ) ) ) ); ?>" value="<?php echo esc_attr( $customer_state ); ?>" placeholder="<?php esc_html_e( 'State/Province', 'easy-digital-downloads' ); ?>"<?php Functions\mark_field_required( 'card_state' ); ?>/>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<div id="edd-card-zip-wrap" class="edd-blocks-form__group edd-blocks-form__group-zip">
|
||||
<label for="card_zip" class="edd-label">
|
||||
<?php
|
||||
esc_html_e( 'ZIP/Postal Code', 'easy-digital-downloads' );
|
||||
if ( edd_field_is_required( 'card_zip' ) ) {
|
||||
echo EDD()->html->show_required();
|
||||
}
|
||||
?>
|
||||
</label>
|
||||
<input type="text" id="card_zip" name="card_zip" class="<?php echo esc_attr( implode( ' ', Functions\get_input_classes( 'card_zip', array( 'edd-input' ) ) ) ); ?>" placeholder="<?php esc_html_e( 'Zip / Postal Code', 'easy-digital-downloads' ); ?>" value="<?php echo esc_attr( $customer['address']['zip'] ); ?>"<?php Functions\mark_field_required( 'card_zip' ); ?>/>
|
||||
</div>
|
||||
</div>
|
||||
<?php do_action( 'edd_cc_billing_bottom' ); ?>
|
||||
<?php wp_nonce_field( 'edd-checkout-address-fields', 'edd-checkout-address-fields-nonce', false, true ); ?>
|
||||
</fieldset>
|
||||
<?php
|
@ -0,0 +1,76 @@
|
||||
<fieldset id="edd_cc_fields" class="edd-do-validate edd-blocks-form">
|
||||
<legend><?php esc_html_e( 'Credit Card Info', 'easy-digital-downloads' ); ?></legend>
|
||||
<?php if ( is_ssl() ) : ?>
|
||||
<div id="edd_secure_site_wrapper">
|
||||
<?php
|
||||
echo edd_get_payment_icon(
|
||||
array(
|
||||
'icon' => 'lock',
|
||||
'width' => 16,
|
||||
'height' => 16,
|
||||
'title' => __( 'Secure SSL encrypted payment', 'easy-digital-downloads' ),
|
||||
'classes' => array( 'edd-icon', 'edd-icon-lock' ),
|
||||
)
|
||||
);
|
||||
?>
|
||||
<span><?php esc_html_e( 'This is a secure SSL encrypted payment.', 'easy-digital-downloads' ); ?></span>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<div id="edd-card-name-wrap" class="edd-blocks-form__group edd-blocks-form__group-card--name">
|
||||
<label for="card_name" class="edd-label">
|
||||
<?php
|
||||
esc_html_e( 'Name on the Card', 'easy-digital-downloads' );
|
||||
echo EDD()->html->show_required();
|
||||
?>
|
||||
</label>
|
||||
<input type="text" autocomplete="off" name="card_name" id="card_name" class="card-name edd-input required" placeholder="<?php _e( 'Card name', 'easy-digital-downloads' ); ?>" />
|
||||
</div>
|
||||
<div id="edd-card-number-wrap" class="edd-blocks-form__group edd-blocks-form__group-card--number">
|
||||
<label for="card_number" class="edd-label">
|
||||
<?php
|
||||
esc_html_e( 'Card Number', 'easy-digital-downloads' );
|
||||
echo EDD()->html->show_required();
|
||||
?>
|
||||
<span class="card-type"></span>
|
||||
</label>
|
||||
<input type="tel" pattern="^[0-9!@#$%^&* ]*$" autocomplete="off" name="card_number" id="card_number" class="card-number edd-input required" placeholder="<?php esc_html_e( 'Card number', 'easy-digital-downloads' ); ?>" />
|
||||
</div>
|
||||
<div class="edd-blocks-form__halves">
|
||||
<div id="edd-card-cvc-wrap" class="edd-blocks-form__group edd-blocks-form__group-card--cvc">
|
||||
<label for="card_cvc" class="edd-label">
|
||||
<?php
|
||||
esc_html_e( 'CVC', 'easy-digital-downloads' );
|
||||
echo EDD()->html->show_required();
|
||||
?>
|
||||
</label>
|
||||
<input type="tel" pattern="[0-9]{3,4}" size="4" maxlength="4" autocomplete="off" name="card_cvc" id="card_cvc" class="card-cvc edd-input required" placeholder="<?php _e( 'Security code', 'easy-digital-downloads' ); ?>" />
|
||||
</div>
|
||||
<?php do_action( 'edd_before_cc_expiration' ); ?>
|
||||
<div class="card-expiration" class="edd-blocks-form__group edd-blocks-form__group-card--expiration">
|
||||
<label for="card_exp_month" class="edd-label">
|
||||
<?php
|
||||
esc_html_e( 'Expiration (MM/YY)', 'easy-digital-downloads' );
|
||||
echo EDD()->html->show_required();
|
||||
?>
|
||||
</label>
|
||||
<select id="card_exp_month" name="card_exp_month" class="card-expiry-month edd-select edd-select-small required">
|
||||
<?php
|
||||
for ( $i = 1; $i <= 12; $i++ ) {
|
||||
echo '<option value="' . absint( $i ) . '">' . sprintf( '%02d', absint( $i ) ) . '</option>';
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
<span class="exp-divider">/</span>
|
||||
<select id="card_exp_year" name="card_exp_year" class="card-expiry-year edd-select edd-select-small required">
|
||||
<?php
|
||||
$year = gmdate( 'Y' );
|
||||
for ( $i = $year; $i <= $year + 30; $i++ ) {
|
||||
echo '<option value="' . absint( $i ) . '">' . esc_html( substr( $i, 2 ) ) . '</option>';
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
<?php do_action( 'edd_after_cc_expiration' ); ?>
|
||||
</div>
|
||||
|
||||
</fieldset>
|
@ -0,0 +1,57 @@
|
||||
<div id="edd_payment_mode_select_wrap">
|
||||
<?php do_action( 'edd_payment_mode_top' ); ?>
|
||||
|
||||
<?php if ( edd_is_ajax_disabled() ) { ?>
|
||||
<form id="edd_payment_mode" action="<?php echo esc_url( edd_get_current_page_url() ); ?>" method="GET">
|
||||
<?php } ?>
|
||||
|
||||
<fieldset id="edd_payment_mode_select">
|
||||
<legend><?php esc_html_e( 'Select Payment Method', 'easy-digital-downloads' ); ?></legend>
|
||||
<?php do_action( 'edd_payment_mode_before_gateways_wrap' ); ?>
|
||||
<div id="edd-payment-mode-wrap">
|
||||
<?php
|
||||
do_action( 'edd_payment_mode_before_gateways' );
|
||||
|
||||
$gateways = edd_get_enabled_payment_gateways( true );
|
||||
$payment_icons = EDD\Blocks\Checkout\Gateways\get_payment_icons();
|
||||
$default = edd_get_option( 'default_gateway' );
|
||||
foreach ( $gateways as $gateway_id => $gateway ) {
|
||||
$checked = $gateway_id === $default ? 'checked' : checked( $gateway_id, $payment_mode, false );
|
||||
$class = 'edd-gateway-option';
|
||||
if ( $checked ) {
|
||||
$class .= ' edd-gateway-option-selected';
|
||||
}
|
||||
|
||||
?>
|
||||
<label for="edd-gateway-<?php echo esc_attr( $gateway_id ); ?>" class="<?php echo esc_attr( $class ); ?>" id="edd-gateway-option-<?php echo esc_attr( $gateway_id ); ?>">
|
||||
<input type="radio" name="payment-mode" class="edd-gateway" id="edd-gateway-<?php echo esc_attr( $gateway_id ); ?>" value="<?php echo esc_attr( $gateway_id ); ?>" data-<?php echo esc_attr( $gateway_id ); ?>-nonce="<?php echo esc_attr( wp_create_nonce( 'edd-gateway-selected-' . esc_attr( $gateway_id ) ) ); ?>" autocomplete="off" <?php echo esc_attr( $checked ); ?>>
|
||||
<?php
|
||||
echo esc_html( apply_filters( 'edd_gateway_checkout_label_' . $gateway_id, $gateway['checkout_label'] ) );
|
||||
if ( $payment_icons ) {
|
||||
$gateway_icons = EDD\Blocks\Checkout\Gateways\get_gateway_icons( $gateway_id, $gateway );
|
||||
if ( $gateway_icons ) {
|
||||
EDD\Blocks\Checkout\Gateways\do_payment_icons( $payment_icons, $gateway_icons );
|
||||
}
|
||||
}
|
||||
?>
|
||||
</label>
|
||||
<?php
|
||||
}
|
||||
|
||||
do_action( 'edd_payment_mode_after_gateways' );
|
||||
?>
|
||||
</div>
|
||||
|
||||
<?php do_action( 'edd_payment_mode_after_gateways_wrap' ); ?>
|
||||
</fieldset>
|
||||
|
||||
<div id="edd_payment_mode_submit" class="edd-no-js">
|
||||
<input type="hidden" name="edd_action" value="gateway_select" />
|
||||
<input type="hidden" name="page_id" value="<?php echo absint( edd_get_current_page_url() ); ?>"/>
|
||||
<input type="submit" name="gateway_submit" id="edd_next_button" class="edd-submit" value="<?php esc_html_e( 'Next', 'easy-digital-downloads' ); ?>"/>
|
||||
</div>
|
||||
|
||||
<?php if ( edd_is_ajax_disabled() ) : ?>
|
||||
</form>
|
||||
<?php endif; ?>
|
||||
</div>
|
@ -0,0 +1,14 @@
|
||||
<?php
|
||||
if ( function_exists( 'EDD_CFM' ) ) {
|
||||
return;
|
||||
}
|
||||
?>
|
||||
<?php if ( ! empty( $customer['email'] ) ) : ?>
|
||||
<input type="hidden" name="edd_email" id="edd-email" value="<?php echo esc_attr( $customer['email'] ); ?>" required/>
|
||||
<?php endif; ?>
|
||||
<?php if ( ! empty( $customer['first_name'] ) ) : ?>
|
||||
<input type="hidden" name="edd_first" id="edd-first" value="<?php echo esc_attr( $customer['first_name'] ); ?>"/>
|
||||
<?php endif; ?>
|
||||
<?php if ( ! empty( $customer['last_name'] ) ) : ?>
|
||||
<input type="hidden" name="edd_last" id="edd-last" value="<?php echo esc_attr( $customer['last_name'] ); ?>"/>
|
||||
<?php endif; ?>
|
@ -0,0 +1,29 @@
|
||||
<fieldset id="edd_login_fields" class="edd-blocks-form">
|
||||
<legend><?php esc_html_e( 'Log Into Your Account', 'easy-digital-downloads' ); ?></legend>
|
||||
<div class="edd-blocks-form__group edd-blocks-form__group-username">
|
||||
<label for="edd_user_login">
|
||||
<?php
|
||||
esc_html_e( 'Username or Email', 'easy-digital-downloads' );
|
||||
echo EDD()->html->show_required();
|
||||
?>
|
||||
</label>
|
||||
<div class="edd-blocks-form__control">
|
||||
<input name="edd_user_login" id="edd_user_login" class="edd-required edd-input" type="text" required/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="edd-blocks-form__group edd-blocks-form__group-password">
|
||||
<label for="edd_user_pass">
|
||||
<?php
|
||||
esc_html_e( 'Password', 'easy-digital-downloads' );
|
||||
echo EDD()->html->show_required();
|
||||
?>
|
||||
</label>
|
||||
<div class="edd-blocks-form__control">
|
||||
<input name="edd_user_pass" id="edd_user_pass" class="edd-password edd-required edd-input" type="password" required/>
|
||||
</div>
|
||||
</div>
|
||||
<div id="edd-user-login-submit">
|
||||
<input type="submit" class="<?php echo esc_attr( implode( ' ', EDD\Blocks\Functions\get_button_classes() ) ); ?>" name="edd_login_submit" value="<?php esc_html_e( 'Log in', 'easy-digital-downloads' ); ?>"/>
|
||||
<?php wp_nonce_field( 'edd-login-form', 'edd_login_nonce', false, true ); ?>
|
||||
</div>
|
||||
</fieldset>
|
@ -0,0 +1,48 @@
|
||||
<?php
|
||||
if ( function_exists( 'EDD_CFM' ) ) {
|
||||
return;
|
||||
}
|
||||
?>
|
||||
<fieldset id="edd_checkout_user_info" class="edd-blocks-form">
|
||||
<legend><?php esc_html_e( 'Personal Info', 'easy-digital-downloads' ); ?></legend>
|
||||
<?php if ( empty( $customer['email'] ) ) : ?>
|
||||
<div id="edd-email-wrap">
|
||||
<label class="edd-label" for="edd-email">
|
||||
<?php
|
||||
esc_html_e( 'Email address', 'easy-digital-downloads' );
|
||||
echo EDD()->html->show_required();
|
||||
?>
|
||||
</label>
|
||||
<input class="edd-input required" type="email" name="edd_email" placeholder="<?php esc_html_e( 'Email address', 'easy-digital-downloads' ); ?>" id="edd-email" value="<?php echo esc_attr( $customer['email'] ); ?>" aria-describedby="edd-email-description" required/>
|
||||
<p class="edd-description" id="edd-email-description"><?php esc_html_e( 'We will send the purchase receipt to this address.', 'easy-digital-downloads' ); ?></p>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php if ( empty( $customer['first_name'] ) ) : ?>
|
||||
<div id="edd-first-name-wrap">
|
||||
<label class="edd-label" for="edd-first">
|
||||
<?php
|
||||
esc_html_e( 'First name', 'easy-digital-downloads' );
|
||||
if ( edd_field_is_required( 'edd_first' ) ) {
|
||||
echo EDD()->html->show_required();
|
||||
}
|
||||
?>
|
||||
</label>
|
||||
<input class="edd-input required" type="text" name="edd_first" placeholder="<?php esc_html_e( 'First name', 'easy-digital-downloads' ); ?>" id="edd-first" value="<?php echo esc_attr( $customer['first_name'] ); ?>" aria-describedby="edd-first-description" <?php EDD\Blocks\Functions\mark_field_required( 'edd_first' ); ?>/>
|
||||
<p class="edd-description" id="edd-first-description"><?php esc_html_e( 'We will use this to personalize your account experience.', 'easy-digital-downloads' ); ?></p>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php if ( empty( $customer['last_name'] ) ) : ?>
|
||||
<div id="edd-last-name-wrap">
|
||||
<label class="edd-label" for="edd-last">
|
||||
<?php
|
||||
esc_html_e( 'Last name', 'easy-digital-downloads' );
|
||||
if ( edd_field_is_required( 'edd_last' ) ) {
|
||||
echo EDD()->html->show_required();
|
||||
}
|
||||
?>
|
||||
</label>
|
||||
<input class="edd-input" type="text" name="edd_last" id="edd-last" placeholder="<?php esc_html_e( 'Last name', 'easy-digital-downloads' ); ?>" value="<?php echo esc_attr( $customer['last_name'] ); ?>" aria-describedby="edd-last-description" <?php EDD\Blocks\Functions\mark_field_required( 'edd_last' ); ?>/>
|
||||
<p class="edd-description" id="edd-last-description"><?php esc_html_e( 'We will use this as well to personalize your account experience.', 'easy-digital-downloads' ); ?></p>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</fieldset>
|
@ -0,0 +1,38 @@
|
||||
<?php require 'personal-info.php'; ?>
|
||||
<fieldset class="edd-blocks-form">
|
||||
<legend><?php esc_html_e( 'Register For a New Account', 'easy-digital-downloads' ); ?></legend>
|
||||
<div class="edd-blocks-form__group edd-blocks-form__group-username">
|
||||
<label for="edd_user_register">
|
||||
<?php
|
||||
esc_html_e( 'Username', 'easy-digital-downloads' );
|
||||
echo EDD()->html->show_required();
|
||||
?>
|
||||
</label>
|
||||
<div class="edd-blocks-form__control">
|
||||
<input name="edd_user_login" id="edd_user_register" class="edd-required edd-input" type="text" required/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="edd-blocks-form__group edd-blocks-form__group-password">
|
||||
<label for="edd-user-pass">
|
||||
<?php
|
||||
esc_html_e( 'Password', 'easy-digital-downloads' );
|
||||
echo EDD()->html->show_required();
|
||||
?>
|
||||
</label>
|
||||
<div class="edd-blocks-form__control">
|
||||
<input id="edd-user-pass" class="password required edd-input" type="password" name="edd_user_pass" required />
|
||||
</div>
|
||||
</div>
|
||||
<div class="edd-blocks-form__group edd-blocks-form__group-password-confirm">
|
||||
<label for="edd-user-pass2">
|
||||
<?php
|
||||
esc_html_e( 'Confirm Password', 'easy-digital-downloads' );
|
||||
echo EDD()->html->show_required();
|
||||
?>
|
||||
</label>
|
||||
<div class="edd-blocks-form__control">
|
||||
<input id="edd-user-pass2" class="password required edd-input" type="password" name="edd_user_pass_confirm" required />
|
||||
</div>
|
||||
<input type="hidden" name="edd-purchase-var" value="needs-to-register"/>
|
||||
</div>
|
||||
</fieldset>
|
Reference in New Issue
Block a user