This filter allows you to adjust the point cost calculation in WooCommerce. The filter is used in two different instances in WooCommerce:
a) In Cart
When a user views their cart on both the cart page and on the checkout page, the filter is used to calculate the users cart total in points.
b) When paying using points
When a user selects to pay using points on the checkout page, the filter is used to calculate the amount of points a user must pay for the order. If the user does not have the point amount this filter returns, the payment is declined.
By default, the exchange rate you set in your settings is used to calculate the cost but you can use this filter to run your own calculation.
The cost of the cart / order in your store currency.
Either the cart object or the order object, depending on where the filter is used.
Returns TRUE if the filter is used when showing the cart total cost in points and FALSE when calculating the cost during checkout (if the buyer selected to pay using points).
The myCRED payment gateway object.
Example 1: Apply a custom exchange rate for users with the ``Author`` role. Everyone else gets the exchange rate you set in your settings.