Skip to content

Commit

Permalink
update the ai generated product page to woocommerce page
Browse files Browse the repository at this point in the history
  • Loading branch information
ramyakrishnai committed Jul 25, 2024
1 parent 2e998cb commit b8f1a6f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion includes/Services/SiteGenService.php
Original file line number Diff line number Diff line change
Expand Up @@ -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' );
}
}
}

Expand Down

0 comments on commit b8f1a6f

Please sign in to comment.