Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Nithin – WPMU DEV Support

    (@wpmudevsupport11)

    Hi @dinah7806,

    Are you referring to the billing field in PayPal? or some other field on the form side?

    Could you please explain how to access the form on your page? Should I click any specific button to load the form?

    The billing field is added by default from PayPal side, so it cannot be removed. The Shipping address field can be disabled via the following snippet:

    <?php
    
    add_filter( 'forminator_paypal_create_order_request', 'wpmudev_remove_shipping_data', 10, 2 );
    function wpmudev_remove_shipping_data( $request, $data ){
    	if( $data['form_id'] != 2910 ){
    		return $request;
    	}
    	if( empty( $request['application_context']['shipping_preference'] ) ){
    		$request['application_context']['shipping_preference'] = 'NO_SHIPPING';
    	}
    	return $request;
    }

    Where 2910 in the above code needs to be changed to your Form ID, suppose the form ID Is 123, then the above line will change to:

    	if( $data['form_id'] != 123 ){
    

    The above code can be added via mu-plugins. Please check this link on how to implement the above code as a?mu-plugins:
    https://wpmudev.com/docs/using-wordpress/installing-wordpress-plugins/#installing-mu-plugins

    Looking forward to your response.

    Kind Regards,

    Nithin

    Plugin Support Dmytro – WPMU DEV Support

    (@wpmudevsupport16)

    Hello @dinah7806,

    Hope you’re doing well today!

    I’m marking this thread as resolved for now, since we haven’t heard from you.
    Please feel free to get in touch with us again, if you need our assistance!

    Best Regards,
    Dmytro

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Billing Address Form’ is closed to new replies.