Authorize.net gateway form - removing Company, Phone, and Fax fields

I'm using the Membership Plugin version 3.5.2.9 . On the Authorize.net gateway form I need to remove the Company, Phone, and Fax fields. How can this be done?

  • Michelle Shull

    Hey there, Doug!

    Those elements are going to be a bit hard to target, so we need to do some dreaded template edits. Fortunately, they're super simple, so as long as you bookmark this forum post, and or copy/paste what I'm about to share, updating this file will be simple the next time Membership updates.

    First, use FTP to access your site, and navigate to:

    wp-content/plugins/membership/membershipincludes/gateways/gateway.authorizenetarb.php

    Open up that file to edit it, and look for the following lines of code:

    <customer>
    
    <id>" . ( isset($this->params['customerId'] ) ? $this->params['customerId'] : '' ) . "</id>
    
     <email>" . ( isset($this->params['customerEmail'] ) ? $this->params['customerEmail'] : '' ) . "</email>
    
     <phoneNumber>" . ( isset($this->params['customerPhoneNumber'] ) ? $this->params['customerPhoneNumber'] : '' ) . "</phoneNumber>
    
    <faxNumber>" . ( isset($this->params['customerFaxNumber'] ) ? $this->params['customerFaxNumber'] : '' ) . "</faxNumber>
    
    </customer>
    
    	   <billTo>
    
    	    <firstName>". ( isset($this->params['firstName'] ) ? $this->params['firstName'] : '' ) . "</firstName>
    
    	    <lastName>" . ( isset($this->params['lastName'] ) ? $this->params['lastName'] : '' ) . "</lastName>
    
    	    <company>" . ( isset($this->params['company'] ) ? $this->params['company'] : '' ) . "</company>
    
    	   <address>" . ( isset($this->params['address'] ) ? $this->params['address'] : '' ) . "</address>
    
    	     <city>" . ( isset($this->params['city'] ) ? $this->params['city'] : '' ) . "</city>
    
    	    <state>" . ( isset($this->params['state'] ) ? $this->params['state'] : '' ) . "</state>
    
    	      <zip>" . ( isset($this->params['zip'] ) ? $this->params['zip'] : '' ) . "</zip>
    
    	        </billTo>
    
    	     <shipTo>
    
    	        <firstName>". ( isset($this->params['shipFirstName'] ) ? $this->params['shipFirstName'] : '' ) . "</firstName>
    
    	           <lastName>" . ( isset($this->params['shipLastName'] ) ? $this->params['shipLastName'] : '' ) . "</lastName>
    
    	          <company>" . ( isset($this->params['shipCompany'] ) ? $this->params['shipCompany'] : '' ) . "</company>
    
    	  <address>" . ( isset($this->params['shipAddress'] ) ? $this->params['shipAddress'] : '' ) . "</address>
    
    	 <city>" . ( isset($this->params['shipCity'] ) ? $this->params['shipCity'] : '' ) . "</city>
    
    	 <state>" . ( isset($this->params['shipState'] ) ? $this->params['shipState'] : '' ) . "</state>
    
    	   <zip>" . ( isset($this->params['shipZip'] ) ? $this->params['shipZip'] : '' ) . "</zip>
    
    	   </shipTo>

    You're going to comment out the lines you don't want by wrapping them like so:

    /*<faxNumber>" . ( isset($this->params['customerFaxNumber'] ) ? $this->params['customerFaxNumber'] : '' ) . "</faxNumber>*/

    Repeat this for each of the lines you don't want, phone, company, etc.

    Save the file, and re-upload.

    Check the process again, and those fields should be hidden.

    Thanks!

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.