Can remove parent assignment as its not used
This commit is contained in:
parent
f6698006ce
commit
70c755c09e
|
@ -202,7 +202,6 @@ function wc_get_featured_product_ids() {
|
|||
/**
|
||||
* Filter to allow product_cat in the permalinks for products.
|
||||
*
|
||||
* @access public
|
||||
* @param string $permalink The existing permalink URL.
|
||||
* @param WP_Post $post
|
||||
* @return string
|
||||
|
@ -228,7 +227,7 @@ function wc_product_post_type_link( $permalink, $post ) {
|
|||
$category_object = get_term( $category_object, 'product_cat' );
|
||||
$product_cat = $category_object->slug;
|
||||
|
||||
if ( $parent = $category_object->parent ) {
|
||||
if ( $category_object->parent ) {
|
||||
$ancestors = get_ancestors( $category_object->term_id, 'product_cat' );
|
||||
foreach ( $ancestors as $ancestor ) {
|
||||
$ancestor_object = get_term( $ancestor, 'product_cat' );
|
||||
|
|
Loading…
Reference in New Issue