I have a problem with Gravity Forms plugin code. I’ve created whole form and I’ve set up currency to be “⬔. The thing I want to accomplish is to have just different currency symbol on “Subtotal” part.
So all prices will be in “⬔ but last part where everything is calculated I just want to insert some other symbol eg. SUBTOTAL: $ 999 instead of SUBTOTAL: ⬠999
I found that gravityforms/includes/fields/class-gf-field-calculation.php is file that I have to edit, that is this part:
return "<div class='ginput_container'>
<input type='hidden' name='input_{$id}.1' value='{$product_name}' class='gform_hidden' />
<span class='ginput_product_price_label'>" . apply_filters( "gform_product_price_{$form_id}", apply_filters( 'gform_product_price', __( 'Price', 'gravityforms' ), $form_id ), $form_id ) . ":</span> <span class='ginput_product_price' id='{$field_id}'>" . esc_html( GFCommon::to_money( $price, $currency ) ) . "</span>
<input type='hidden' name='input_{$id}.2' id='ginput_base_price_{$form_id}_{$this->id}' class='gform_hidden' value='" . esc_attr( $price ) . "'/>
{$quantity_field}
</div>";
}
I can change ‘Price’ text but the problem is when I edit section after that:
<span class='ginput_product_price' id='{$field_id}'>" . esc_html( GFCommon::to_money( $price, $currency ) ) . "</span>
Nothing happens when I edit $price and $currency. Can you tell me what am I doing wrong?