yes, i want to conditionally change the product’s price. but when i put these code :
function return_custom_price($price, $product) {
$price = $my_custom_price;
return $price;
}
add_filter(‘woocommerce_get_price’, ‘return_custom_price’, 10, 2);
don’t accept custom variable price. only just accept static price like $price = 100. custom variable’s($my_custom_price) price changes every time by ajax but this function’s price not changing.