Home Forums Theme Support Dokan Remove prices decline line error!

This topic is: resolved

This topic contains 2 replies, has 2 voices, and was last updated by  mx 5 years ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #20790

    mx
    Member
    Post count: 42

    Hi,
    In dokan/function.php, Add the following code, PHP tried many times but the error!Could you tell me how to solve this?
    Looking forward to reply!
    Thank you very much!

    Reference: http://wedevs.com/support/topic/how-to-remove-the-dashed-discount-price/

    #20832

    Sk
    Moderator
    Post count: 371

    Hello mx,

    this function works fine in PHP version-5.3 and later. may be you are using lower version of php. you could update your php version.

    or

    don't use the function in filter line. use like following

    
    function discount_price_dash_remove($price, $product){
    
        $tax_display_mode      = get_option( 'woocommerce_tax_display_shop' );
        $display_price         = $tax_display_mode == 'incl' ? $product->get_price_including_tax() : $product->get_price_excluding_tax();
    
        $price = wc_price( $display_price ) . $product->get_price_suffix();
        
        return $price;
    
    }
    add_filter( 'woocommerce_sale_price_html', 'discount_price_dash_remove', 10 ,2 );
    

    this will work.

    Thank you

    #20862

    mx
    Member
    Post count: 42

    Hello sk_shaikat,
    Thank you!

Viewing 3 posts - 1 through 3 (of 3 total)

The topic ‘Remove prices decline line error!’ is closed to new replies.