• Resolved alinh

    (@alinh)


    Hi,

    I usually search on forums and in most of the cases I find the solution, but now I’m going crazy :))

    I found some codes to put in the function.php but:

    *One remove entirly the variable prices in the shop page and on the product page
    *Another one can change the text (price from, into another word), and is changed in both pages (shop pages and product page)

    I believe that the syntax name for the variable price range is the same (because the change affect on both pages).

    I need to keep on shop page the variable price range (just to change the name, instead of “FROM” to put “another text”
    & simultaneous
    To remove completly the variable price range from the product page. (If cannot be done this, I can put a custom text there)

    Please I need your support!!
    Alin

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hello @alinh ,

    Okay, this is quite a similar problem that I suggested in this discussion – How To Replace Variation Price Range with Selected Variant Price inside Product?

    The code from that discussion can be used as a skeleton to modify how the price range is shown archive page and on the single product page.

    For example, to hide the price range in the single product page I have tried this –

    add_filter( 'woocommerce_variable_sale_price_html', 'remove_variable_price_range_single_product', 10, 2 );
    add_filter( 'woocommerce_variable_price_html', 'remove_variable_price_range_single_product', 10, 2 );
    
    function remove_variable_price_range_single_product ($price) {
    	if(is_product()) {
    		return '';
    	} else {
    		return $price;
    	}
    };

    You can take suggestions from the examples and combine them to get your desired result.

    I hope the information helps.

    Thank you ??

    Hi there,

    We’ve not heard back from you in a while, so I’m marking this thread as resolved.

    Hopefully, you were able to find a solution to your problem! If you have further questions, please feel free to open a new topic.

    Thank you ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Remove variable product price range only in product page’ is closed to new replies.