add_filter( 'gform_currencies', function( $currencies ) {
    //$currencies['EUR']['symbol_left'] = '€';
    $currencies['EUR']['symbol_left'] = '';
    $currencies['EUR']['symbol_right'] = '';
    $currencies['EUR']['thousand_separator'] = '.';
    $currencies['EUR']['decimal_separator'] = ',';
 
    return $currencies;
} );
add_filter( 'gform_field_choice_markup_pre_render', function ( $choice_markup, $choice, $field, $value ) {

	if ( $field->type == 'product' ) {
		$new_string = sprintf( '>%s <span>%s</span><', $choice['text'], GFCommon::to_money( $choice['price'] ) );
		return str_replace( ">{$choice['text']}<", $new_string, $choice_markup );
	}

	return $choice_markup;
}, 10, 4 );

 

Geef een reactie 0