<?php
// Add custom Theme Functions here

/**
 * Custom currency and currency symbol
 */
add_filter( 'woocommerce_currencies', 'add_my_currency' );

function add_my_currency( $currencies ) {
     $currencies['EURHTMOIS'] = __( 'HT par mois', 'woocommerce' );
     return $currencies;
}

add_filter('woocommerce_currency_symbol', 'add_my_currency_symbol', 10, 2);

function add_my_currency_symbol( $currency_symbol, $currency ) {
     switch( $currency ) {
          case 'EURHTMOIS': $currency_symbol = '€ HT/mois'; break;
     }
     return $currency_symbol;
}


/**
 * Run shortcodes on HTML field content.
 * Utilisé pour afficher la liste de souhait dans le formulaire de demande de devis
 *
 * @link   https://wpforms.com/developers/how-to-display-shortcodes-inside-the-html-field/
 *
 */
/*function wpf_dev_html_field_shortcodes( $field, $field_atts, $form_data ) {

    if ( ! empty( $field['code'] ) ) {
        $field['code'] = do_shortcode( $field['code'] );
    }
    return $field;
}
add_filter( 'wpforms_html_field_display', 'wpf_dev_html_field_shortcodes', 10, 3 );*/
