wc_get_endpoint_url - added support for permalinks containing a query string Closes #5016