• Resolved shustus

    (@shustus)


    We use a CI/CD pipeline to test our WooCommerce website. It installs wordpress and all needed plugins including flexible shipping. It also injects all necessary plugin configuration (e.g., values stored in the wp_options and wp_woocommerce_shipping_XXX tables).

    This works fine, except for the Flexible Shipping configuration stored in wp_option’ woocommerce_flexible_shipping_single_XXX_settings (where XXX is the shipping zone).
    When changing the data using the backend (WooCommerce -> Options -> Shipping Zones etc), the value is updated accordingly in the database. However, when we change the value directly in the database (for instance, changing a price from $6 to $7), the options for that zone are reset completely.

    Question: how/where is the flexible shipping zone configuration stored? Can it be that the configuration is cached outside the database? Is there a way to trigger a read from the database?

    Suggestions are welcome, thank you!

    • This topic was modified 7 months, 1 week ago by shustus.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author grzegorzturbasa

    (@grzegorzturbasa)

    Hi @shustus
    Thank you for your patience. Settings are stored only in woocommerce_flexible_shipping_single_XXX_settings fields. Do you serialize the field value before putting it to database? During testing, I encounter an identical issue that has been connected to method_rules value which is stored as a JSON. Try to strip whitespaces and sse if the issue persists.

    Kind regards,
    Greg

    Thread Starter shustus

    (@shustus)

    Hi Greg,

    Thank you for the quick reply! You were absolutely correct. Changing the value directly in phpMyAdmin worked fine, so it looks like the issue is indeed with our database restore script.

    I’ll investigate further into the script to identify where it might be causing this issue. Your suggestion was very helpful!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Flexible Shipping settings not fully restored on database restore’ is closed to new replies.