{
  "$schema": "https://playground.wordpress.net/blueprint-schema.json",
  "meta": {
    "title": "Minimal Payment Addons for Elementor Setup",
    "description": "A minimal WordPress Playground instance with Elementor and Payment Plugins for Stripe Elementor (by Pay Addons) installed and activated. Use this as a starting point to explore the plugin's widgets and settings before connecting a real Stripe account.",
    "author": "payaddons",
    "categories": ["elementor", "stripe", "payments"]
  },
  "plugins": ["elementor", "pay-addons-for-elementor"],
  "features": {
    "networking": true,
    "intl": true
  },
  "landingPage": "/wp-admin/admin.php?page=elementor-pay-addons",
  "login": true,
  "preferredVersions": {
    "php": "8.3",
    "wp": "latest"
  },
  "siteOptions": {
    "blogName": "Pay Addons Demo"
  },
  "steps": [
    {
      "step": "writeFile",
      "path": "/wordpress/wp-content/mu-plugins/no-ssl-verify.php",
      "data": "<?php\n// WordPress Playground runs in a WebAssembly sandbox without a trusted CA bundle.\n// Disable SSL peer verification so outgoing requests (e.g. Stripe API) can succeed.\n\n// 1. WordPress HTTP API (wp_remote_*, wp_safe_remote_*)\nadd_filter('https_ssl_verify',       '__return_false');\nadd_filter('https_local_ssl_verify', '__return_false');\n\n// 2. Stripe PHP SDK — uses its own cURL via ApiRequestor, bypasses WP HTTP API.\n//    Must run after the Stripe autoloader is available (plugins_loaded).\nadd_action('plugins_loaded', function () {\n    if (class_exists('\\\\Stripe\\\\HttpClient\\\\CurlClient') && class_exists('\\\\Stripe\\\\ApiRequestor')) {\n        $curlClient = new \\Stripe\\HttpClient\\CurlClient([CURLOPT_SSL_VERIFYPEER => false, CURLOPT_SSL_VERIFYHOST => 0]);\n        \\Stripe\\ApiRequestor::setHttpClient($curlClient);\n    }\n}, 99);\n"
    },
    {
      "step": "runPHP",
      "code": "<?php include '/wordpress/wp-load.php'; delete_transient('elementor_activation_redirect'); update_option('elementor_onboarded', true);"
    },
    {
      "step": "runPHP",
      "code": "<?php include '/wordpress/wp-load.php'; update_option('epa_stripe_settings', ['test_mode' => 'yes', 'default_currency' => 'EUR', 'test_publishable_key' => 'pk_test_51Lxrx5GFLvO8KFkjdpQAbRXDZ62zYtCLou0UT606pQiAhWWXHRlD39PAYnIJmu3a2H5Qy6YjtDr8cPeOvYfz7vmi00uYqT8kMm', 'test_secret_key' => 'rk_test_51Lxrx5GFLvO8KFkj2x7FhNqJGEbos4IrKuo0nG9Rp61abQO4grPqHSW3pAef6aZBmCkUTo7pEnxZSilRFQodZ2iE00SJU0WlVr']);"
    },
    {
      "step": "runPHP",
      "code": "<?php include '/wordpress/wp-load.php'; wp_insert_post(['post_title' => 'Pay Addons Demo', 'post_status' => 'publish', 'post_type' => 'page', 'post_content' => '<!-- wp:paragraph --><p>Edit this page with Elementor to add a Checkout Button or Payment Form widget.</p><!-- /wp:paragraph -->']);"
    }
  ]
}
