• Resolved Harm10

    (@harm10)


    I have a test multi site (not accessible from the outside) on which I want to install WooCommerce in only 1 of the sites.

    First I tried to install it in the normal way for plugins that you only want to use in specific sites: download the plugin and do NOT network activate.
    In the specific site I activated WooCommerce and got the dialog that belongs to the set-up. But that never ended. So after a while I went back to the dashboard and it looked like WC was added properly. After a while I got problems with accessing methods that should be in the $product.
    In SQLAdmin there where only *_wc_* and *_woo* tables for the site I activated it on.

    So I found instructions on the net that looked like you could not have this set-up and needed to Network activate it. So I followed the uninstall instruction on Network level (with the wp-config option).
    It turned out the tables were removed so I deleted them manually.
    I started again on Network level and now activated on Network level. All seemed well but going to another site that should not have WC the dialog started for the WC set-up.
    In SQLAdmin I saw that each site got its own set of WC tables without me going to the dashboard of them all.
    So I deleted WC again.
    But looking in SQLAdmin all tables were still there…………….
    So I deleted them all.

    Then I started again Network install without activation and activated on the site intended.
    I did not get the set-up dialog! And when I went to WC settings I got error messages for tables that are missing. Looking in SQLAdmin again there were no _wc_ and _woo tables.

    Can WC work in the way I want? So only 1 WC installation active in a set of more sites on multisite?
    If so, how should I do a (re)install to get the dialog again? And is it correct that it never finishes when used like that?

    I am on WP 6.7.1

    The page I need help with: [log in to see the link]

Viewing 15 replies - 1 through 15 (of 18 total)
  • Plugin Support Zubair Zahid (woo-hc)

    (@doublezed2)

    Hello Harm10,

    Thank you for contacting WooCommerce support.

    I understand you are trying to install WooCommerce on a multisite setup.

    The first method you tried is the correct way to install WooCommerce on a multisite.
    You mentioned setup never ended. Could you explain what happened during the setup process?

    After a while I got problems with accessing methods that should be in the $product.

    Are you trying to use custom code?
    Please explain this further so I can understand your goal.

    Once I have more information, I will be in a better position to assist you further.

    Best regards.

    Thread Starter Harm10

    (@harm10)

    Thank you for responding!

    Good to hear that my first attempt was the right approach. As I said WC started installing and I got that screen with moving completion bar. It went until around 80% and then nothing happened.
    It looked like everything was there. At that time I did not check the tables.
    My current problem is that it seems impossible to restart the whole install process?

    I am using custom php code to add meta tags to the header. So code like
    global $product;
    $price = $product->get_price();
    And that failed as the method is not there?
    When vardumping the product var only its name was there?
    But I have not investigated what should be there.
    I might add that this custom code works fine on another site (not multi).

    Plugin Support Mahfuzur Rahman(woo-hc)

    (@mahfuzurwp)

    Hi @harm10,

    Thank you for your detailed reply!

    It seems like the initial installation may not have completed successfully, which could explain the issues you’re facing with missing methods for $product. Let’s address your concerns one by one:

    Restarting the WooCommerce Installation

    1. Deactivate WooCommerce

    ? Navigate to the specific site’s Dashboard → Plugins and deactivate WooCommerce.

    2. Manually Remove WooCommerce Data

    ? Open your wp-config.php file and add the following line to enable WooCommerce’s uninstall script:

    define( 'WC_REMOVE_ALL_DATA', true );

    ? Delete WooCommerce from the Plugins page.

    ? This will remove all WooCommerce data (including tables like _wc_* and _woo_*) for that site only.

    3. Reinstall WooCommerce

    ? Reinstall WooCommerce via the Plugins page and activate it for the specific site.

    ? Visit the setup wizard at /wp-admin/admin.php?page=wc-setup to reinitialize the installation.

    4. Remove the Cleanup Line

    Once WooCommerce is reinstalled and functioning, remove the WC_REMOVE_ALL_DATA line from wp-config.php.

    After completing these steps, your WooCommerce installation should be reset and ready to go. Let us know how it goes!

    Thread Starter Harm10

    (@harm10)

    Thanks again for the elaborate description.
    I followed it all.
    As soon as I click Activate in the site that needs WC I get a display that Tables are missing to make WC work properly. So I assume something is left from my previous attempt(s)?
    I can redo the whole delete process and possible check something that you can specify?
    Apparently activating does not trigger the install process at the moment?

    I should add that the activation has created tables: 14 *_woo* and 16 *_wc_*

    More edit: When Deleting the plugin the process never finishes. It keeps on displaying Deleting……
    When I refresh the screen the plugin is no longer visible in the list.
    But all tables are still there.

    I looked in the log and found this at the moment of activation:
    WordPress database error Table ‘deb20385n4_testmulti.wp_4_wc_orders’ doesn’t exist for query SELECT COUNT(*) FROM wp_4_wc_orders WHERE type = ‘shop_order’ AND……………
    The orders table is not there so how can that be?

    At the moment of the deletion I find this error:
    PHP Fatal error: Uncaught Error: Class “WC_Plugin_Updates” not found
    and
    PHP Fatal error: Uncaught Error: Class “ActionScheduler_Lock” not found

    • This reply was modified 3 months ago by Harm10.
    • This reply was modified 3 months ago by Harm10.
    Plugin Support Zubair Zahid (woo-hc)

    (@doublezed2)

    Hello Harm10,

    Thank you for your reply.

    I have noticed that you are facing issues with steps that should work easily.
    I suspect this could be a problem with your server setup.

    Could you tell me how you have set up your WordPress multisite?
    Tell me about the tools and the process for better understanding.

    Also, share your site’s System Status Report.
    You can find it via WooCommerce > Status.
    Select Get system report and then Copy for support.

    Looking forward to your response. ??

    Thread Starter Harm10

    (@harm10)

    I have set up this multi site a long time ago using the normal WP file and instructions.
    Just to experiment at that time.
    As WP now has these problems with the correct loading of the textdomain this is the only place I can have the latest version of WP active to try and resolve all those problems (also with my own child themes).
    So that is why I have to set-up WC there. As stated the very first install seemed to work fine besides the problems I had with missing methods and the installation dialog not finishing.

    So I started a new site and let setup wizard install WC there. That went fine.
    How should I deliver the Status report from there? You probably do not want it to be pasted here?

    Then I again tried to activate WC again in the site that fails and this is still the case. Did you have a look at the log messages I reported? Also in the new site the orders table is there and in the error one still not.
    As I need to remove the tables by hand surely there is some WP table entry that remains to block creation of that table?
    BTW the faulty site does have the option now to get the Status. But how to deliver that to you?
    It states that are missing: wp_4_wc_orders, wp_4_wc_order_addresses, wp_4_wc_order_operational_data, wp_4_wc_orders_meta

    Plugin Support Zubair Zahid (woo-hc)

    (@doublezed2)

    Hello Harm10,

    Thank you for your reply.

    I asked about the server environment because you mentioned the site is not publicly accessible.
    Is the site set up using localhost software on your PC/laptop or is it set up on a web server purchased from a hosting company?

    I checked the error log you reported:
    WordPress database error Table ‘deb20385n4_testmulti.wp_4_wc_orders’ doesn’t exist
    This indicates that the WooCommerce setup was not completed successfully and therefore, the wc_orders table is missing.

    You can paste the System Status Report in https://gist.github.com and share the link with me.

    Looking forward to your response. ??

    Thread Starter Harm10

    (@harm10)

    Thanks for replying. If you read back you can see that the WC installation went fine on another new site in the same multi site set-up. The missing tables are there (in this case wp_9 versions).
    As soon as I start the activation on site 4 I get the error that tables are missing (I removed them all before starting the activation on site 4). So how come only part of them is recreated? Is there some wp-option holding info on where WC is/was active?

    Perhaps I can copy the missing tables from site 9 to get running again?

    Gist: https://gist.github.com/Harm10/b832dbb530aeaf55dc62fc2c4c8f2625

    Plugin Support Zubair Zahid (woo-hc)

    (@doublezed2)

    Hello Harm10,

    Thank you for your reply.

    I checked your site’s report and can confirm that the wp_4_wc_orders and wp_4_wc_orders_meta tables are missing from the database.

    I removed them all before starting the activation on site 4

    I understand you manually removed all the WooCommerce tables from the database and then attempted to reinstall WooCommerce.

    I recommend not to remove or modify the database manually.
    If you want to remove the WooCommrece, you can follow this guide:
    Uninstall and remove all WooCommerce Data.

    At this point, it would be best to consult a professional WooCommerce developer who can analyze your site’s database in depth and help you recover or reset WooCommerce on site 4.

    Please let me know if you have any questions.

    Best regards.

    Thread Starter Harm10

    (@harm10)

    Again thanks for your reply.
    I had to remove the tables manually as the uninstall process did not finish properly. So I had no choice.

    You do not answer my question about me trying to copy the missing tables from the working site?

    And also you do not answer why the activation stops creating tables? There has to be some settings left that influences the process.

    As this is merely some test site that I will never use for live presentation I feel that it is a bit to far fetched to let a professional look at it?
    I “fear” the moment that I could remove WC on a live site.

    Plugin Support Zubair Zahid (woo-hc)

    (@doublezed2)

    Hello Harm10,

    Thank you for your reply.

    You do not answer my question about me trying to copy the missing tables from the working site?

    Copying tables from one site to another might result in unexpected results.
    I cannot say for certain whether that will work or not.
    But since you have a test site, you may try it.
    Please note that this step falls under customization and is outside of our support scope.

    And also you do not answer why the activation stops creating tables? There has to be some settings left that influences the process.

    I understand you manually deleted the tables from the database and reran the setup process.
    As a result, some tables were not recreated. I just realized that the missing tables are related to HPOS.
    I suggest you try deactivating HPOS and then activating it. This may trigger the recreation of tables.

    Please note that this is not a normal flow of operations, so tables may not be recreated.
    This is why I recommended consulting a professional developer to analyze your site in depth and help you recover the database for site 4 on a WordPress Multisite.

    I hope this helps. Feel free to reply if you have more questions.

    Best regards.

    Thread Starter Harm10

    (@harm10)

    I did not know what HPOS is. I checked with the working site and it turns out I am using WooCommerce REST API which is incompatible with HPOS. So I did not use HPOS.

    I copied the 4 tables missing and now the errors in Status are gone.
    Is there a way that I can test whether WC is now working properly?

    Thread Starter Harm10

    (@harm10)

    @doublezed2 I was activating the different plugins I want to use on this site 4 to see whether they work. One of them is the REST legacy REST API. As soon as I activated that one I get the message that HPOS is also on?
    This is weird as the option is not on when I look at the Settings. You can probably see that in the gist I sent?
    What is wrong?

    Plugin Support Zubair Zahid (woo-hc)

    (@doublezed2)

    Hello Harm10,

    Thank you for your reply.

    I checked the SSR you shared previously and can confirm that HPOS is enabled on the site.
    You can search for “HPOS feature enabled” in the system status report. It shows a check mark.

    Please note that HPOS is enabled by default in WooCommerce.
    To learn more about HPOS and how to manage settings, I suggest you read this guide.

    Let me know if you have any other questions. ??

    Best regards.

    Thread Starter Harm10

    (@harm10)

    I switched HPOS off on both sites. Weirdest thing is that those extra tables are still there. You would expect them to be deleted or not?

    And there is also the question how can I test whether WC is properly installed?

Viewing 15 replies - 1 through 15 (of 18 total)
  • You must be logged in to reply to this topic.