• Resolved elisa94

    (@elisa94)


    Hi, I have a big problem.
    I want to add new shipping zone, but for me it’s impossible because when I try to save a new shipping zone the plugin don’t work and don’t save my new zone…the same problem when I try to modify the default zone “Rest of the World”…can you help me?

    https://wordpress.org/plugins/woocommerce/

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Author Mike Jolley (a11n)

    (@mikejolley)

    In chrome, View > Developer > Javascript console. See if there are errors listed.

    Thread Starter elisa94

    (@elisa94)

    I checked, there is only this written, no errors:

    JQMIGRATE: Migrate is installed, version 1.4.1

    Thread Starter elisa94

    (@elisa94)

    now I found this error in BO, in Woocommerce > Setting status:

    woocommerce_shipping_zones Table does not exist
    woocommerce_shipping_zone_locations Table does not exist
    woocommerce_shipping_zone_methods Table does not exist
    woocommerce_payment_tokens Table does not exist
    woocommerce_payment_tokenmeta Table does not exist

    Until upgrade, there was all ok.

    Caleb Burks

    (@icaleb)

    Automattic Happiness Engineer

    Have you run the database update? There should be a message at the top of your admin screen asking you to run the WooCommerce database update. Just click the button to update and it will be done for you.

    Thread Starter elisa94

    (@elisa94)

    No, there is not a message to upgrade in admin.

    Plugin Author Mike Jolley (a11n)

    (@mikejolley)

    Deactivate and reactivate WooCommerce. If the tables don’t exist again, check server error logs to see why the tables cannot be created.

    Thread Starter elisa94

    (@elisa94)

    I deactivated and reactivated WooCommerce, after that, i’ve uninstalled and remounted the plugin but the problem persists.
    How can I see the error logs?

    Thread Starter elisa94

    (@elisa94)

    Oh, I find the solution. I’ve made a new wordpress installation to check if the plugin works (and so is)…so I’ve copied the correct tables in the missing tables on my real site, and now it works.

    Thanks for the help.

    Hi Mike…

    This is a common problem when updating from version 2.5.x to 2.6.x there is 5 tables missing:
    woocommerce_shipping_zones Table does not exist
    woocommerce_shipping_zone_locations Table does not exist
    woocommerce_shipping_zone_methods Table does not exist
    woocommerce_payment_tokens Table does not exist
    woocommerce_payment_tokenmeta Table does not exist

    I have:
    -updated database (after plugin update)
    -tryed to desactivate / reactivate WooCommerce,
    -Put-it in debug mode (nothing)…

    This is the 2nd thread where I see this problem, solved by manual creation of missing data tables:

    This 5 tables that we need to create, I suppose are:
    woocommerce_shipping_zones
    woocommerce_shipping_zone_locations
    woocommerce_shipping_zone_methods
    woocommerce_payment_tokens
    woocommerce_payment_tokenmeta

    Here it is the corresponding Log:

    07-11-2016 @ 00:56:32 - Running wc_update_260_options callback
    07-11-2016 @ 00:56:32 - Finished wc_update_260_options callback
    07-11-2016 @ 00:56:32 - Running wc_update_260_termmeta callback
    07-11-2016 @ 00:56:32 - Finished wc_update_260_termmeta callback
    07-11-2016 @ 00:56:32 - Running wc_update_260_zones callback
    07-11-2016 @ 00:56:32 - Finished wc_update_260_zones callback
    07-11-2016 @ 00:56:32 - Running wc_update_260_zone_methods callback
    07-11-2016 @ 00:56:32 - Finished wc_update_260_zone_methods callback
    07-11-2016 @ 00:56:32 - Running wc_update_260_refunds callback
    07-11-2016 @ 00:56:32 - Finished wc_update_260_refunds callback
    07-11-2016 @ 00:56:32 - Running wc_update_260_db_version callback
    07-11-2016 @ 00:56:32 - Finished wc_update_260_db_version callback
    07-11-2016 @ 00:56:32 - Data update complete
    07-11-2016 @ 00:56:32 - Unable to dispatch WooCommerce updater: Operation timed out after 1001 milliseconds with 0 bytes received

    Could you give us an SQL script to do it quick via phpMyAdmin?

    Thanks

    check userDB permissions
    you mast have permission to create tables when
    desactivate / reactivate WooCommerce

    Exactly same issue for me, any solution? Thanks a lot

    As iflyru has mention it, the problem was coming from database username permissions. This user before was able only to make things in existing tables but not able to create new ones. Ensure that the username of your WP database has all rights…

    If you can’t get rid of this, try to create manually this with an SQL request in phpMyAdmin:

    CREATE TABLE wp_woocommerce_shipping_zones (
      zone_id bigint(20) NOT NULL,
      zone_name varchar(255) NOT NULL,
      zone_order bigint(20) NOT NULL
    ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
    
    CREATE TABLE wp_woocommerce_shipping_zone_locations (
      location_id bigint(20) NOT NULL,
      zone_id bigint(20) NOT NULL,
      location_code varchar(255) NOT NULL,
      location_type varchar(40) NOT NULL
    ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
    
    CREATE TABLE wp_woocommerce_shipping_zone_methods (
      zone_id bigint(20) NOT NULL,
      instance_id bigint(20) NOT NULL,
      method_id varchar(255) NOT NULL,
      method_order bigint(20) NOT NULL,
      is_enabled tinyint(1) NOT NULL DEFAULT '1'
    ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
    
    CREATE TABLE wp_woocommerce_tax_rates (
      tax_rate_id bigint(20) NOT NULL,
      tax_rate_country varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
      tax_rate_state varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
      tax_rate varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
      tax_rate_name varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
      tax_rate_priority bigint(20) NOT NULL,
      tax_rate_compound int(1) NOT NULL DEFAULT '0',
      tax_rate_shipping int(1) NOT NULL DEFAULT '1',
      tax_rate_order bigint(20) NOT NULL,
      tax_rate_class varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT ''
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
    
    CREATE TABLE wp_woocommerce_tax_rate_locations (
      location_id bigint(20) NOT NULL,
      location_code varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
      tax_rate_id bigint(20) NOT NULL,
      location_type varchar(40) COLLATE utf8mb4_unicode_ci NOT NULL
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
    
    ALTER TABLE wp_woocommerce_shipping_zones
      ADD PRIMARY KEY (zone_id);
    
    ALTER TABLE wp_woocommerce_shipping_zone_locations
      ADD PRIMARY KEY (location_id),
      ADD KEY location_id (location_id),
      ADD KEY location_type (location_type),
      ADD KEY location_type_code (location_type,location_code(90));
    
    ALTER TABLE wp_woocommerce_shipping_zone_methods
      ADD PRIMARY KEY (instance_id);
    
    ALTER TABLE wp_woocommerce_tax_rates
      ADD PRIMARY KEY (tax_rate_id),
      ADD KEY tax_rate_country (tax_rate_country(191)),
      ADD KEY tax_rate_state (tax_rate_state(191)),
      ADD KEY tax_rate_class (tax_rate_class(191)),
      ADD KEY tax_rate_priority (tax_rate_priority);
    
    ALTER TABLE wp_woocommerce_tax_rate_locations
      ADD PRIMARY KEY (location_id),
      ADD KEY tax_rate_id (tax_rate_id),
      ADD KEY location_type (location_type),
      ADD KEY location_type_code (location_type,location_code(90));
    
    ALTER TABLE wp_woocommerce_shipping_zones
      MODIFY zone_id bigint(20) NOT NULL AUTO_INCREMENT;
    ALTER TABLE wp_woocommerce_shipping_zone_locations
      MODIFY location_id bigint(20) NOT NULL AUTO_INCREMENT;
    ALTER TABLE wp_woocommerce_shipping_zone_methods
      MODIFY instance_id bigint(20) NOT NULL AUTO_INCREMENT;
    ALTER TABLE wp_woocommerce_tax_rates
      MODIFY tax_rate_id bigint(20) NOT NULL AUTO_INCREMENT;
    ALTER TABLE wp_woocommerce_tax_rate_locations
      MODIFY location_id bigint(20) NOT NULL AUTO_INCREMENT;

    Or with this sql file that you can download

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Shipping zone problem (plugin don't save)’ is closed to new replies.