Add PayPay field into Registration form of Freelance Engine Theme

0 Comments

Last updated on

This tutorial guides you to add the PayPal field to the Registration form of the Freelance Engine Theme.
Copy /themes/freelanceengine/page-register.php to freelanceengine-child/page-register.php then add this HTML code where you want to appear in this field.

<div class="fre-input-field">
<input type="text" class="form-control" id="et_user_paypal" name="et_user_paypal" placeholder="Your PayPal" >
</div>

Now add these codes to freelanceengine-child/functioins.php file

add_action('ae_after_insert_user', 'cs_save_paypal_field' );
function cs_save_paypal_field( $result ) {
   $et_user_paypal = isset($_REQUEST['et_user_paypal']) ? $_REQUEST['et_user_paypal'] : '';
   if( ! empty($et_user_paypal ) ) {
      $user_id = isset($result->ID) ? $result->ID : '';
      if(!empty($user_id)){
           update_user_meta( $user_id, 'paypal', $et_user_paypal );
      }
   }
}

Feel Free to Contact Us for advanced Customization of the Freelance Engine Theme.

Leave a Comment