How to create Yoast Databases programatically?
-
Hello, I am creating new multisite blogs programmatically via the function wpmu_create_blog() (Yoast 19.7.1, WordPress 6.0.1)
Part of my process involves a call to update_option(‘page_on_front’,$id) which at the time of execution, the yoast tables have yet to be created, and this fails due to yoast having a hook on “update_option_page_on_front” and the tables not existing.
How can I programmatically trigger the creation of the tables? the standard call of “wp_initialize_site” does not trigger yoast to create the tables which is actioned from within wp_insert_site()
the yoast tables do generate the first time I access this blog, but I want them created before that ideally
edit: my current work around “hack” is to suppress “update_option_page_on_front” hook whilst I execute my update_options() call
With thanks
- The topic ‘How to create Yoast Databases programatically?’ is closed to new replies.