wcfm-santa

A deal you can't resist! Get upto 35% Off on this entire cyber week.

CLAIM OFFER
02Day 13Hr 19Min 52Sec
wcfm-santa

Product price: Use comma ',' as decimal seperator

We're shifting our Forum based support to a more dedicated support system!

We'll be closing our Forum support from 10th June, 2020 and move to Email Support assistance.

  • If you are a WCFM premium add-ons user, contact us- here
  • Want to know more before buying our add-ons? Send Pre sale queries- here
  • If you are a WCFM free user, please open a support ticket at WordPress.org
  • For WCFM App related queries, reach us- here
From now the forum will be read-only!

Viewing 1 reply thread
  • Author
    Posts
    • #79212
      fdeckers
      Participant

      I need to set the product price using a comma ‘,’ as decimal seperator. This is also mt WooCommerce setting, but is does not work in WCfM. How can I use a comma as decimal seperator for product price?

    • #79553
      WCFM Forum
      Keymaster

      Hi,

      Please add this code to your site –

      add_filter( 'wcfm_product_manage_fields_pricing', function( $pricing_fields, $product_id, $product_type ) {
      	if( isset( $pricing_fields['regular_price'] ) ) {
      		$pricing_fields['regular_price']['type'] = 'text';
      	}
      	if( isset( $pricing_fields['sale_price'] ) ) {
      		$pricing_fields['sale_price']['type'] = 'text';
      	}
      	
      	return $pricing_fields;
      }, 50, 3 );

      Add this code to your child theme’s functions.php
      In case you do not have child theme then add code using this plugin – https://wordpress.org/plugins/code-snippets/

      Thank You

Viewing 1 reply thread
  • You must be logged in to reply to this topic.