Answer the question
In order to leave comments, you need to log in
Category nesting in Woocommerce Wordpress?
There is an online store on Wordpress + Woocommerce.
Now the CNC
structure for product categories is as follows : https://site.ru/catalog/parent1/parent2/category/ the address must contain only the /catalog/ nesting and the category address, regardless of the nesting level at which this category is located.
How best to implement? M.b. is there some lightweight plugin?
Answer the question
In order to leave comments, you need to log in
To understand what's going on, you just need to look . For example, like this:
var q = (function(x,foo = () => x) {
console.log('a)',x,y,foo()); //2 undefined 2
var x;
console.log('b)',x,y,foo()); //2 undefined 2
var y = x;
console.log('c)',x,y,foo()); //2 2 2
x =3;
console.log('d)',x,y,foo()); //3 2 2
return [x,y,foo()];
})(2)
console.log(q) // [3,2,2]
var q = (console.log('init q',typeof x), //init q undefined
function(x,foo = (console.log('init foo',x),() => x)) { //init foo 2
console.log('a)',x,y,foo()); //2 undefined 2
var x;
console.log('b)',x,y,foo()); //2 undefined 2
var y = x;
console.log('c)',x,y,foo()); //2 2 2
x =3;
console.log('d)',x,y,foo()); //3 2 2
return [x,y,foo()];
}
)(2)
console.log(q) // [3,2,2]
It's all about declaring variables.
var declares a variable X within the entire scope of the function, while the function refers to X within the scope of the block of curly braces {}.
let-const-var;
scopes ;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question