{
  "$schema": "https://playground.wordpress.net/blueprint-schema.json",
  "landingPage": "wp-admin/admin.php?page=wc-settings&tab=probo_settings",
  "features": {
    "networking": true
  },
  "plugins": [
    "woocommerce",
    "probo-connect"
  ],
  "steps": [
    {
      "step": "installTheme",
      "themeData": {
        "resource": "wordpress.org/themes",
        "slug": "storefront"
      },
      "options": {
        "activate": true
      }
    },
    {
      "step": "setSiteOptions",
      "options": {
        "blogname": "Probo Connect DEMO",
        "blogdescription": "Configureer en bestel printwerk via Probo",
        "woocommerce_currency": "EUR",
        "woocommerce_currency_pos": "left_space",
        "woocommerce_price_thousand_sep": ".",
        "woocommerce_price_decimal_sep": ",",
        "woocommerce_price_num_decimals": "2",
        "woocommerce_default_country": "NL",
        "woocommerce_store_address": "Cypresbaan 9",
        "woocommerce_store_city": "Capelle aan den IJssel",
        "woocommerce_store_postcode": "2908 LT",
        "woocommerce_weight_unit": "kg",
        "woocommerce_dimension_unit": "cm",
        "woocommerce_calc_taxes": "no",
        "woocommerce_allow_tracking": "no",
        "woocommerce_coming_soon": "no",
        "woocommerce_task_list_hidden": "yes",
        "woocommerce_task_list_complete": "yes",
        "woocommerce_task_list_welcome_modal_dismissed": "yes",
        "woocommerce_task_list_prompt_shown": "yes",
        "woocommerce_admin_install_timestamp": "1600000000",
        "show_on_front": "page"
      }
    },
    {
      "step": "runPHP",
      "code": "<?php require 'wordpress/wp-load.php'; if ( ! function_exists( 'wc_get_page_id' ) ) { return; }\n\n// Skip the WooCommerce onboarding wizard / setup redirect.\ndelete_transient( '_wc_activation_redirect' );\nupdate_option( 'woocommerce_onboarding_profile', array( 'skipped' => true, 'completed' => true ) );\nupdate_option( 'woocommerce_admin_customize_store_completed', 'yes' );\n\n// Force the CLASSIC (shortcode) cart & checkout instead of the block variant.\n$cart_id = wc_get_page_id( 'cart' );\nif ( $cart_id > 0 ) { wp_update_post( array( 'ID' => $cart_id, 'post_content' => '[woocommerce_cart]' ) ); }\n$checkout_id = wc_get_page_id( 'checkout' );\nif ( $checkout_id > 0 ) { wp_update_post( array( 'ID' => $checkout_id, 'post_content' => '[woocommerce_checkout]' ) ); }\n\n// Use the Shop page as the site homepage so the store is the first thing visitors see.\n$shop_id = wc_get_page_id( 'shop' );\nif ( $shop_id > 0 ) { update_option( 'show_on_front', 'page' ); update_option( 'page_on_front', $shop_id ); }\n\n// Create four demo Probo print products so the Probo Connect product tab can be demonstrated.\n$demo_products = array(\n\tarray( 'title' => 'Spandoek', 'price' => '24.95', 'excerpt' => 'PVC spandoek op maat, inclusief zoom en ogen.' ),\n\tarray( 'title' => 'Roll-up banner', 'price' => '49.95', 'excerpt' => 'Roll-up display 85 x 200 cm inclusief cassette en tas.' ),\n\tarray( 'title' => 'Stickers', 'price' => '9.95', 'excerpt' => 'Stickers op maat, per vel of op rol.' ),\n\tarray( 'title' => 'Vlag', 'price' => '39.95', 'excerpt' => 'Beachflag of gevelvlag in diverse formaten.' ),\n);\nforeach ( $demo_products as $demo ) {\n\t$existing = get_posts( array( 'post_type' => 'product', 'title' => $demo['title'], 'post_status' => 'any', 'numberposts' => 1, 'fields' => 'ids' ) );\n\tif ( ! empty( $existing ) ) { continue; }\n\t$product_id = wp_insert_post( array(\n\t\t'post_title'   => $demo['title'],\n\t\t'post_excerpt' => $demo['excerpt'],\n\t\t'post_content' => $demo['excerpt'],\n\t\t'post_status'  => 'publish',\n\t\t'post_type'    => 'product',\n\t) );\n\tif ( is_wp_error( $product_id ) || ! $product_id ) { continue; }\n\twp_set_object_terms( $product_id, 'probo_configurable', 'product_type' );\n\tupdate_post_meta( $product_id, '_price', $demo['price'] );\n\tupdate_post_meta( $product_id, '_regular_price', $demo['price'] );\n\tupdate_post_meta( $product_id, '_virtual', 'no' );\n\tupdate_post_meta( $product_id, '_downloadable', 'no' );\n\tupdate_post_meta( $product_id, '_manage_stock', 'no' );\n\tupdate_post_meta( $product_id, '_stock_status', 'instock' );\n\tupdate_post_meta( $product_id, '_visibility', 'visible' );\n}\n\nif ( function_exists( 'wc_delete_product_transients' ) ) { wc_delete_product_transients(); }\nflush_rewrite_rules();"
    },
    {
      "step": "login",
      "username": "admin",
      "password": "password"
    }
  ]
}
