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

Add WooCommerce demo blueprint with custom flat rate shipping and pro… #62

Merged
merged 5 commits into from
Dec 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions blueprints/woo-shipping/blueprint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
"$schema": "https://playground.wordpress.net/blueprint-schema.json",
"meta": {
"title": "Minimal WooCommerce Setup with Sample Products, Shipping, and Payment Method",
"description": "To create a WordPress Playground instance that installs WooCommerce, adds a custom flat rate shipping method via a plugin, imports WooCommerce sample products XML to demonstrate the shipping method on the cart/checkout pages, and enables the Direct Bank Transfer payment method.",
"author": "calvinrodrigues500",
"categories": [
"woocommerce",
"shipping",
"flat_rate"
]
},
"steps": [
{
"step": "setSiteOptions",
"options": {
"blogName": "Woo Shipping Method"
}
},
{
"step": "installPlugin",
"pluginZipFile": {
"resource": "wordpress.org/plugins",
"slug": "woocommerce"
}
},
{
"step": "importWxr",
"file": {
"resource": "url",
"url": "https://raw.githubusercontent.com/calvinrodrigues500/blueprints/woo-shipping/blueprints/woo-shipping/sample_products.xml"
}
},
{
"step": "mkdir",
"path": "/wordpress/wp-content/plugins/woo-shipping-method"
},
{
"step": "writeFile",
"path": "/wordpress/wp-content/plugins/woo-shipping-method/woo-shipping-method.php",
"data": {
"resource": "url",
"url": "https://raw.githubusercontent.com/calvinrodrigues500/blueprints/woo-shipping/blueprints/woo-shipping/woo-shipping-method/woo-shipping-method.php"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's include this file in this PR, the idea is to avoid referencing external resources. See https://github.com/WordPress/blueprints/blob/trunk/CONTRIBUTING.md

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@adamziel
Sorry for the delay in responding.
I’m a bit unclear about the approach to updating the URLs. Should I point them to https://raw.githubusercontent.com/WordPress/blueprints/... now, even though this would cause errors when testing the blueprint in a playground until the PR is merged?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah no, I only meant to have this file included in the PR, which I now see it was – perhaps I got confused when reviewing :-) Either way, it looks good now, thank you for proposing this Blueprint!

}
},
{
"step": "activatePlugin",
"pluginName": "woo-shipping-method",
"pluginPath": "woo-shipping-method/woo-shipping-method.php"
}
]
}
Loading
Loading