-
Notifications
You must be signed in to change notification settings - Fork 2
Shipping Block Extension #49
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
// Import the default config file and expose it in the project root. | ||
// Useful for editor integrations. | ||
module.exports = require( '@wordpress/prettier-config' ); |
Original file line number | Diff line number | Diff line change | ||||||
---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,13 @@ | ||||||||
{ | ||||||||
"$schema": "https://schemas.wp.org/trunk/block.json", | ||||||||
"apiVersion": 3, | ||||||||
"name": "create-block/shipping-workshop", | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This name does not follow the specs: https://developer.wordpress.org/block-editor/reference-guides/block-api/block-metadata/#name
Suggested change
|
||||||||
"version": "1.0.0", | ||||||||
"title": "Shipping Workshop", | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The title should be the displayed name. Consider something like:
Suggested change
|
||||||||
"category": "widgets", | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add a description:
Suggested change
|
||||||||
"icon": "palmtree", | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||
"textdomain": "shipping-workshop", | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This needs to match the plugin's
Suggested change
|
||||||||
"editorScript": "file:./build/index.js", | ||||||||
"editorStyle": "file:./build/index.css", | ||||||||
"style": "file:./build/style-index.css" | ||||||||
} |
Original file line number | Diff line number | Diff line change | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1 @@ | ||||||||||||||||||
<?php return array('dependencies' => array('wp-plugins'), 'version' => '3f3d50b7ebd74f8ef2af'); | ||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Where does this version come from? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The version Number is coming from our plugin main file |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{ | ||
"apiVersion": 2, | ||
"name": "shipping-workshop/shipping-workshop-block", | ||
"version": "2.0.0", | ||
"title": "Alternative Shipping Options Block", | ||
"category": "woocommerce", | ||
"description": "Adds a select field to let the shopper choose alternative shipping instructions.", | ||
"supports": { | ||
"html": false, | ||
"align": false, | ||
"multiple": false, | ||
"reusable": false | ||
}, | ||
"parent": [ | ||
"woocommerce/checkout-shipping-methods-block" | ||
], | ||
"attributes": { | ||
"lock": { | ||
"type": "object", | ||
"default": { | ||
"remove": true, | ||
"move": true | ||
} | ||
}, | ||
"text": { | ||
"type": "string", | ||
"default": "" | ||
} | ||
}, | ||
"textdomain": "shipping-workshop", | ||
"editorStyle": "file:../../../build/style-shipping-workshop-block.css" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<?php return array('dependencies' => array('lodash', 'react', 'wc-blocks-checkout', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => 'ae8ec2a68155879c014d'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this file actually used or a left over? There is also a
src/js/shipping-workshop-block/block.json
file?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The smart-send-logistics/block.json file is indeed used and not a leftover. It is responsiblefor registering the main shipping workshop block in WooCommerce and informing WordPress about the block's associated script and style files. This ensures that the block is properly integrated and functional within the WordPress and WooCommerce environments.On the other hand, the src/js/shipping-workshop-block/block.json file is used to define the inner blocks, their specific configurations, and essential details. This file provides information necessary for the proper rendering and behaviour of the inner blocks within the shipping workshop block.Both files are crucial for the correct setup and operation of the shipping workshop block and its components.