'}}

How to create a matching homepage using WordPress! Plugin [HivePress] How to hide the address input field when making a WooCommerce payment

At HanamiWEB Online School,

●Ask questions in real-time in the virtual study room!

●Ask as many questions as you want via chat!

●E-learning materials that you can learn as much as you want, 24 hours a day!

All included for just 2,500 yen/month!

We explain HivePress, which allows you to create a matching site for services that are intangible products.

To generate payments, we added the paid extension MarketPlace and the free extension WooCommerce.

When users purchase a service, an address entry field appears.

Here's how to solve this.

Install the Code Snippts plugin

  • Plugin
  • New additions
  • Enter [Code Snippets] in the keywords
  • Install now
  • activation

To do.

Add code

The Code Snippets plugin is a great plugin that will safely add code to your function.php.

Click Add New and enter the following code:

add_filter( 'woocommerce_checkout_fields' , 'bbloomer_simplify_checkout_virtual' ); function bbloomer_simplify_checkout_virtual( $fields ) { $only_virtual = true; foreach( WC()->cart->get_cart() as $cart_item_key => $cart_item ) { // Check if there are non-virtual products if ( ! $cart_item['data']->is_virtual() ) $only_virtual = false; } if( $only_virtual ) { unset($fields['billing']['billing_company']); unset($fields['billing']['billing_address_1']); unset($fields['billing']['billing_address_2']); unset($fields['billing']['billing_city']); unset($fields['billing']['billing_postcode']); unset($fields['billing']['billing_country']); unset($fields['billing']['billing_state']); unset($fields['billing']['billing_phone']); add_filter( 'woocommerce_enable_order_notes_field', '__return_false' ); } return $fields; }

Actually, I enter it like this:

After purchase, you will need to enter

  • Surname
  • given name
  • Email address

And it's that simple!

Leave the reskilling of your website to us!

Since 2019, we have been sharing skills related to WordPress and websites. We have accumulated case studies and know-how, and are good at quickly and accurately solving problems. If you have any concerns about your website, please feel free to contact us via our official LINE account!

↑Click to open the official LINE page

Latest Articles

'}}
Explains how to customize the LifterLMS system automatic output page
'}}
LifterLMS Customization example when the registration date and active date are different due to bank transfer, etc.
'}}
(Solved) Emails sent from WordPress to Gmail are not being sent [Lollipop]
'}}
Explaining package (ticket) settings for the WordPress reservation system Amelia
WP Rocket - WordPress Caching Plugin
en_USEnglish