:::: MENU ::::

WooCommerce get current url

WooCommerce get current url

Today we talk about WooCommerce or WordPress get the current URL. In this tutorial, We focus on getting the current URL for example you need to match or check what is current URL of the category Url or product URL or any other page URL.

Let’s start with our example.

global $wp; //get wordpres global variable
$currentUrl = home_url(add_query_arg(array(), $wp->request));
Author: Qaisar Satti
Last Modified: February 23, 2021

Comments are closed.