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:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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.