* Skip category creation on WC install

* Wait for install to create lookup tables
This commit is contained in:
Joshua T Flowers 2021-07-23 09:36:02 -04:00 committed by GitHub
parent 2316b2f4ab
commit 904b5e282f
1 changed files with 5 additions and 0 deletions

View File

@ -138,6 +138,11 @@ class CategoryLookup {
* @param int $category_id Term ID being created.
*/
public function on_create( $category_id ) {
// If WooCommerce is being installed on a multisite, lookup tables haven't been created yet.
if ( 'yes' === get_transient( 'wc_installing' ) ) {
return;
}
$this->update( $category_id );
}