Set programmatically product sale price and cart item prices in Woocommerce 3

前端 未结 4 1822
走了就别回头了
走了就别回头了 2021-01-28 06:26

This is the continuation of : Set product sale price programmatically in WooCommerce 3

The answer works, however once a user adds the product to cart, the old price stil

4条回答
  •  无人共我
    2021-01-28 07:22

    @LoicTheAztec answers works very nicely, but is not required.

    You need to filter at least woocommerce_product_get_price and woocommerce_product_variation_get_price with the dynamic_sales_price_function.

    To make it work really smoothly, you need some more filters as well.

提交回复
热议问题