diff --git a/includes/Services/SiteGenService.php b/includes/Services/SiteGenService.php index 67a94d2..62872be 100644 --- a/includes/Services/SiteGenService.php +++ b/includes/Services/SiteGenService.php @@ -940,9 +940,12 @@ public static function publish_sitemap_pages( $site_description, $content_style, 'nf_dc_page' => $page['slug'], ) ); - if ( $update_nav_menu && ! is_wp_error( $post_id ) ) { $navigation_links_grammar .= self::get_nav_link_grammar_from_post_data( $post_id, $page['title'], get_permalink( $post_id ) ); + if( $page['slug'] == 'products' || $page['slug'] == 'shop' ){ + update_option( 'woocommerce_shop_page_id', $post_id ); + update_option( 'woocommerce_queue_flush_rewrite_rules', 'yes' ); + } } }