{
  "$schema": "https://playground.wordpress.net/blueprint-schema.json",
  "landingPage": "/wp-admin/edit.php?post_type=woc_hour",
  "preferredVersions": {
    "php": "8.3",
    "wp": "latest"
  },
  "phpExtensionBundles": [
    "kitchen-sink"
  ],
  "steps": [
    {
      "step": "login",
      "username": "admin",
      "password": "password"
    },
    {
      "step": "installPlugin",
      "pluginData": {
        "resource": "wordpress.org/plugins",
        "slug": "woocommerce"
      },
      "options": {
        "activate": true
      }
    },
    {
      "step": "installPlugin",
      "pluginData": {
        "resource": "wordpress.org/plugins",
        "slug": "woc-open-close"
      },
      "options": {
        "activate": true
      }
    },
    {
      "step": "runPHP",
      "code": "<?php require_once '/wordpress/wp-load.php'; woc_fs()->skip_connection(); delete_transient( '_wc_activation_redirect' ); delete_transient( 'fs_plugin_woc-open-close_activated' ); $days = array( '10003', '10004', '10005', '10006', '10007' ); $data = array( 'message' => 'Demo store: ordering resumes during the next opening period.' ); foreach ( $days as $day ) { $data[ $day . '_schedules' ] = array( array( 'open' => '09:00 am', 'close' => '05:00 pm' ) ); } $id = wp_insert_post( array( 'post_type' => 'woc_hour', 'post_title' => 'Demo weekday hours (9 AM–5 PM)', 'post_status' => 'publish' ) ); if ( is_wp_error( $id ) || ! $id ) { throw new Exception( 'Could not create demo schedule' ); } update_post_meta( $id, 'wooopenclose_data', $data ); WPDK\\Utils::update_option( 'woc_active_set', $id );"
    }
  ]
}
