This code checks if the ‘WC_Query’ class exists, and if it does, it instantiates a new instance of the class and assigns it to a variable named ‘$wc_query’. The ‘get_current_endpoint’ method of the ‘WC_Query’ class is then used to assign the current endpoint to the ‘$endpoint’ variable.
Was this code snippet helpful?
YesNo