woocommerce get product id
global $product;
$product->get_id();
woocommerce get product id
global $product;
$product->get_id();
wordpress get product category name by termid
// Testing that $_GET['product-cato'] has been requested and that the product category exists.
if( isset( $_GET['product-cato'] ) && term_exists( intval($_GET['product-cato']), 'product_cat' ) ){
// Get the corresponding WP_Term object
$term = get_term( intval($_GET['product-cato']), 'product_cat' );
//Display the term name for the product category
echo '<p>' . $term->name . '</p>';
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us