1. Home
  2. Knowledge Base
  3. WooCommerce Product Add-Ons Ultimate
  4. Display add-on fields on products that do not have a price
  1. Home
  2. Knowledge Base
  3. Pricing
  4. Display add-on fields on products that do not have a price
  1. Home
  2. Knowledge Base
  3. Advanced
  4. Display add-on fields on products that do not have a price

Display add-on fields on products that do not have a price

By default, add-on fields are only displayed on products that have a price and are purchasable.

However, if you are using your store as a catalogue, or your products are not purchasable, you can add the following line as a snippet to your site:

<?php
/**
* Display add-on fields on products that do not have a price
*/
add_action( 'woocommerce_single_product_summary', 'pewc_product_extra_fields' );

You’ll also need to follow the steps here to hide the totals field. Just choose ‘Hide totals’ in the ‘Display totals fields’ setting.

Was this article helpful?

Related Articles