Can someone please share the snippet to add a description to the “Billing Period (optional)” field in the listing form? I tried all these variations, but none of them worked. Thx
add_filter(
'hivepress/v1/forms/listing_submit',
function( $form ) {
// Option 1: price_period
if ( isset( $form['fields']['price_period'] ) ) {
$form['fields']['price_period']['description'] = 'Select how often the price is charged';
}
// Option 2: billing_period
if ( isset( $form['fields']['billing_period'] ) ) {
$form['fields']['billing_period']['description'] = 'Select how often the price is charged';
}
// Option 3: _price_period (with underscore)
if ( isset( $form['fields']['_price_period'] ) ) {
$form['fields']['_price_period']['description'] = 'Select how often the price is charged';
}
// Option 4: period
if ( isset( $form['fields']['period'] ) ) {
$form['fields']['period']['description'] = 'Select how often the price is charged';
}
// Other fields...
if ( isset( $form['fields']['title'] ) ) {
$form['fields']['title']['description'] = 'Enter a descriptive title for your listing';
}
return $form;
},
1000
);