Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setSiteOptions: Serialize array inputs #1252

Open
adamziel opened this issue Apr 16, 2024 · 0 comments
Open

setSiteOptions: Serialize array inputs #1252

adamziel opened this issue Apr 16, 2024 · 0 comments

Comments

@adamziel
Copy link
Collaborator

Let's serialize Object and Array values in setSiteOptions step.

I just got a question about disabling WooCommerce onboarding. This Blueprint did not work:

    {
      "step": "setSiteOptions",
      "options": {
        "woocommerce_onboarding_profile": {
          "completed": true
        }
      }
    }

This one, however, works:

    {
      "step": "setSiteOptions",
      "options": {
        "woocommerce_onboarding_profile": "a:1:{s:9:\"completed\";b:1;}"
      }
    },

It never makes sense to string-cast the value and write [Object object] – therefore let's automatically PHP serialize anything that isn't a string, number, or a boolean.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant