How to use variables from Plugin methods in custom code?
-
Hello,
we have changed some things in the checkout and moved messages and stuff from the top left to the right. Points and Rewards doesn’t appear to like that and gives us plenty of identical messages in the form of “Would you like to redeem X Points for a discount of Y?”, at the top, at the bottom, and on the right.
The only way to get rid of that (in my opinion) is to deactivate these messages completely and recreate it by hand, only once, on the right. Therefore I need some variables, and I cannot get them ??
In the function “generate_redeem_points_message()” the message is created. It fills 3 variables in “Would you like to redeem {points} {points_label} for a discount of {points_value}?”
I’d like to use these 3 variables points, points_label and points_value in a custom function in thechild theme’s functions.php…but I cannot get them out of the generate_redeem_points_message() function.Putting “global $new_variable” at the top of generate_redeem_points_message() and my_custom_function() does not work.
Who knows how to do that?
Thanks!
- You must be logged in to reply to this topic.