-
Hi, I’m creating profile custom forms, but I can’t find usermetadata for this settings.
I’ve them in my theme, but then I can’t find theme is usermeta list.
Please, help me. This is very important for my site.
Thank you!PHP123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112$logged_in = is_user_logged_in();if( $logged_in ) {$user_address = get_user_meta( get_current_user_id(), '_edd_user_address', true );}$line1 = $logged_in && ! empty( $user_address['line1'] ) ? $user_address['line1'] : '';$line2 = $logged_in && ! empty( $user_address['line2'] ) ? $user_address['line2'] : '';$city = $logged_in && ! empty( $user_address['city'] ) ? $user_address['city'] : '';$zip = $logged_in && ! empty( $user_address['zip'] ) ? $user_address['zip'] : '';ob_start(); ?><fieldset id="edd_cc_address" class="cc-address"><span><legend><?php _e( 'Billing Details', 'edd' ); ?></legend></span><?php do_action( 'edd_cc_billing_top' ); ?><p id="edd-card-address-wrap"><label for="card_address" class="edd-label"><?php _e( 'Billing Address', 'edd' ); ?><?php if( edd_field_is_required( 'card_address' ) ) { ?><span class="edd-required-indicator">*</span><?php } ?></label><span class="edd-description"><?php _e( 'The primary billing address for your credit card.', 'edd' ); ?></span><input type="text" id="card_address" name="card_address" class="card-address edd-input<?php if( edd_field_is_required( 'card_address' ) ) { echo ' required'; } ?>" placeholder="<?php _e( 'Address line 1', 'edd' ); ?>" value="<?php echo $line1; ?>"/></p><p id="edd-card-address-2-wrap"><label for="card_address_2" class="edd-label"><?php _e( 'Billing Address Line 2 (optional)', 'edd' ); ?><?php if( edd_field_is_required( 'card_address_2' ) ) { ?><span class="edd-required-indicator">*</span><?php } ?></label><span class="edd-description"><?php _e( 'The suite, apt no, PO box, etc, associated with your billing address.', 'edd' ); ?></span><input type="text" id="card_address_2" name="card_address_2" class="card-address-2 edd-input<?php if( edd_field_is_required( 'card_address_2' ) ) { echo ' required'; } ?>" placeholder="<?php _e( 'Address line 2', 'edd' ); ?>" value="<?php echo $line2; ?>"/></p><p id="edd-card-city-wrap"><label for="card_city" class="edd-label"><?php _e( 'Billing City', 'edd' ); ?><?php if( edd_field_is_required( 'card_city' ) ) { ?><span class="edd-required-indicator">*</span><?php } ?></label><span class="edd-description"><?php _e( 'The city for your billing address.', 'edd' ); ?></span><input type="text" id="card_city" name="card_city" class="card-city edd-input<?php if( edd_field_is_required( 'card_city' ) ) { echo ' required'; } ?>" placeholder="<?php _e( 'City', 'edd' ); ?>" value="<?php echo $city; ?>"/></p><p id="edd-card-zip-wrap"><label for="card_zip" class="edd-label"><?php _e( 'Billing Zip / Postal Code', 'edd' ); ?><?php if( edd_field_is_required( 'card_zip' ) ) { ?><span class="edd-required-indicator">*</span><?php } ?></label><span class="edd-description"><?php _e( 'The zip or postal code for your billing address.', 'edd' ); ?></span><input type="text" size="4" name="card_zip" class="card-zip edd-input<?php if( edd_field_is_required( 'card_zip' ) ) { echo ' required'; } ?>" placeholder="<?php _e( 'Zip / Postal code', 'edd' ); ?>" value="<?php echo $zip; ?>"/></p><p id="edd-card-country-wrap"><label for="billing_country" class="edd-label"><?php _e( 'Billing Country', 'edd' ); ?><?php if( edd_field_is_required( 'billing_country' ) ) { ?><span class="edd-required-indicator">*</span><?php } ?></label><span class="edd-description"><?php _e( 'The country for your billing address.', 'edd' ); ?></span><select id="billing_country" name="billing_country" id="billing_country" class="billing_country edd-select<?php if( edd_field_is_required( 'billing_country' ) ) { echo ' required'; } ?>"><?php$selected_country = edd_get_shop_country();if( $logged_in && ! empty( $user_address['country'] ) && '*' !== $user_address['country'] ) {$selected_country = $user_address['country'];}$countries = edd_get_country_list();foreach( $countries as $country_code => $country ) {echo '<option value="' . $country_code . '"' . selected( $country_code, $selected_country, false ) . '>' . $country . '</option>';}?></select></p><p id="edd-card-state-wrap"><label for="card_state" class="edd-label"><?php _e( 'Billing State / Province', 'edd' ); ?><?php if( edd_field_is_required( 'card_state' ) ) { ?><span class="edd-required-indicator">*</span><?php } ?></label><span class="edd-description"><?php _e( 'The state or province for your billing address.', 'edd' ); ?></span><?php$selected_state = edd_get_shop_state();$states = edd_get_shop_states( $selected_country );if( $logged_in && ! empty( $user_address['state'] ) ) {$selected_state = $user_address['state'];}if( ! empty( $states ) ) : ?><select id="card_state" name="card_state" id="card_state" class="card_state edd-select<?php if( edd_field_is_required( 'card_state' ) ) { echo ' required'; } ?>"><?phpforeach( $states as $state_code => $state ) {echo '<option value="' . $state_code . '"' . selected( $state_code, $selected_state, false ) . '>' . $state . '</option>';}?></select><?php else : ?><input type="text" size="6" name="card_state" id="card_state" class="card_state edd-input" placeholder="<?php _e( 'State / Province', 'edd' ); ?>"/><?php endif; ?></p><?php do_action( 'edd_cc_billing_bottom' ); ?></fieldset><?phpecho ob_get_clean();}add_action( 'edd_after_cc_fields', 'edd_default_cc_address_fields' );could you help me?
Viewing 1 post (of 1 total)
You must be logged in to reply to this topic.