Call to undefine function wp_get_current_user()
-
Hello,
I have built a simple plugin which is related to redeeming the points at checkout.I have a form to enter the points that the logged in customer want to spend. On entering, the wallet has to be checked for enough balance. The problem here is,I have used ajax url to redirect to a specific page of the same plugin where required calculation will be done.The control goes to the page but in order to get the current user I have used wp_get_current_user() which gives error stating call to undefined function wp_get_current_user(). How to solve this. The same wp_get_current_user() is used in some other page of the plugin where it works.
The topic ‘Call to undefine function wp_get_current_user()’ is closed to new replies.