Title: Checkout fields
Last modified: August 8, 2021

---

# Checkout fields

 *  Resolved [annix](https://wordpress.org/support/users/annix/)
 * (@annix)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/checkout-fields-7/)
 * I would like to rename the checkout fields
    Street address Postcode/ZIP
 * Can somebody direct me the PHP to edit?

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Contributor [Bibhu Prakash Ota](https://wordpress.org/support/users/bibhu1995/)
 * (@bibhu1995)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/checkout-fields-7/#post-14760032)
 * Hello,
 * Do you want to customize the core plugin?
    You can also use the loco translator
   plugin to rename the text as per your requirement.
 * Regards,
    Bibhu
 *  Thread Starter [annix](https://wordpress.org/support/users/annix/)
 * (@annix)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/checkout-fields-7/#post-14762536)
 * customize the core plugin YES, direct me how
 *  Plugin Contributor [Bibhu Prakash Ota](https://wordpress.org/support/users/bibhu1995/)
 * (@bibhu1995)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/checkout-fields-7/#post-14764735)
 * Hello,
 * As per your requirement here is the source code details and you can modify as
   per your requirement.
 * code file location : restropress\includes\rp-core-functions.php
 *     ```
       /**
        * Get defalut checkout fields
        *
        * @since 2.8
        * @return array
        */
       function rp_get_checkout_fields() {
   
         $customer  = RPRESS()->session->get( 'customer' );
         $customer  = wp_parse_args( $customer, array( 'delivery_address' => array(
           'address'   => '',
           'flat'      => '',
           'city'      => '',
           'postcode'  => '',
         ) ) );
   
         $customer['delivery_address'] = array_map( 'sanitize_text_field', $customer['delivery_address'] );
   
         if( is_user_logged_in() ) {
   
           $user_address = get_user_meta( get_current_user_id(), '_rpress_user_delivery_address', true );
   
           foreach( $customer['delivery_address'] as $key => $field ) {
   
             if ( empty( $field ) && ! empty( $user_address[ $key ] ) ) {
               $customer['delivery_address'][ $key ] = $user_address[ $key ];
             } else {
               $customer['delivery_address'][ $key ] = '';
             }
           }
         }
   
         $customer['delivery_address'] = apply_filters( 'rpress_customer_delivery_address', $customer['delivery_address'] );
   
         $checkout_fields = array(
           'rpress_street_address' => array(
             'id' => 'rpress-street-address',
             'title' => __( 'Street Address', 'restropress' ),
             'is_required' => true,
             'is_hidden' => false,
             'name' => 'rpress_street_address',
             'placeholder' => __( 'Street Address', 'restropress' ),
             'value' => $customer['delivery_address']['address'],
           ),
           'rpress_apt_suite' => array(
             'id' => 'rpress-apt-suite',
             'title' => __( 'Apartment, suite, unit etc. (optional)', 'restropress' ),
             'is_required' => false,
             'is_hidden' => false,
             'name' => 'rpress_apt_suite',
             'placeholder' => __( 'Apartment, suite, unit etc. (optional)', 'restropress' ),
             'value' => $customer['delivery_address']['flat'],
           ),
           'rpress_city' => array(
             'id' => 'rpress_city',
             'title' => __( 'Town / City', 'restropress' ),
             'is_required' => true,
             'is_hidden' => false,
             'name' => 'rpress_city',
             'placeholder' => __( 'Town / City', 'restropress' ),
             'value' => $customer['delivery_address']['city'],
           ),
           'rpress_postcode' => array(
             'id' => 'rpress-postcode',
             'title' => __( 'Postcode / ZIP', 'restropress' ),
             'is_required' => true,
             'is_hidden' => false,
             'name' => 'rpress_postcode',
             'placeholder' => __( 'Postcode / ZIP', 'restropress' ),
             'value' => $customer['delivery_address']['postcode'],
           ),
         );
   
         return apply_filters( 'rpress_checkout_fields', $checkout_fields, $customer['delivery_address'] );
       }
       ```
   
 * Regards,
    Bibhu
 *  Thread Starter [annix](https://wordpress.org/support/users/annix/)
 * (@annix)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/checkout-fields-7/#post-14766188)
 * Thank you very much, that worked
    Problem solved:)
 * Kind regards
    Annix

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Checkout fields’ is closed to new replies.

 * ![](https://ps.w.org/restropress/assets/icon-256x256.gif?rev=3216477)
 * [RestroPress - Online Food Ordering System](https://wordpress.org/plugins/restropress/)
 * [Support Threads](https://wordpress.org/support/plugin/restropress/)
 * [Active Topics](https://wordpress.org/support/plugin/restropress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/restropress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/restropress/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [annix](https://wordpress.org/support/users/annix/)
 * Last activity: [4 years, 9 months ago](https://wordpress.org/support/topic/checkout-fields-7/#post-14766188)
 * Status: resolved