Update totals-footer-item.md (#51261)

* Update totals-footer-item.md

replacing `<` & `>` with `&lt;` & `&gt;` for the purposes of displaying html within code snippets on woocommerce docs site.

* update < > with &lt; &gt;

* more small fixes

* update manifiest

* update erroneous tag swap

---------

Co-authored-by: piinthecloud <stephanie.pi@automattic.com>
Co-authored-by: Jacklyn Biggin <hi@jacklyn.dev>
This commit is contained in:
Brent MacKinnon 2024-09-12 10:51:32 -03:00 committed by GitHub
parent 3dc0d69091
commit 5e4a6fc5e6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
23 changed files with 160 additions and 160 deletions

View File

@ -339,11 +339,11 @@ This results in the following address form (the billing form will be the same):
The rendered markup looks like this: The rendered markup looks like this:
```html ```html
<input type="text" id="shipping-namespace-gov-id" autocapitalize="off" &lt;input type="text" id="shipping-namespace-gov-id" autocapitalize="off"
autocomplete="government-id" aria-label="custom aria label" autocomplete="government-id" aria-label="custom aria label"
aria-describedby="some-element" required="" aria-invalid="true" aria-describedby="some-element" required="" aria-invalid="true"
title="Title to show on hover" pattern="[A-Z0-9]{5}" title="Title to show on hover" pattern="[A-Z0-9]{5}"
data-custom="custom data" value="" > data-custom="custom data" value="" &gt;
``` ```
### Rendering a checkbox field ### Rendering a checkbox field

View File

@ -81,7 +81,7 @@ const modifyCartItemClass = ( defaultValue, extensions, args ) => {
const modifyCartItemPrice = ( defaultValue, extensions, args ) => { const modifyCartItemPrice = ( defaultValue, extensions, args ) => {
if ( isOrderSummaryContext( args ) ) { if ( isOrderSummaryContext( args ) ) {
return '<price/> for all items'; return '&lt;price/&gt; for all items';
} }
return defaultValue; return defaultValue;
}; };
@ -95,7 +95,7 @@ const modifyItemName = ( defaultValue, extensions, args ) => {
const modifySubtotalPriceFormat = ( defaultValue, extensions, args ) => { const modifySubtotalPriceFormat = ( defaultValue, extensions, args ) => {
if ( isOrderSummaryContext( args ) ) { if ( isOrderSummaryContext( args ) ) {
return '<price/> per item'; return '&lt;price/&gt; per item';
} }
return defaultValue; return defaultValue;
}; };

View File

@ -106,17 +106,17 @@ The `cartItemPrice` filter allows to format the order summary item price.
### Parameters <!-- omit in toc --> ### Parameters <!-- omit in toc -->
- _defaultValue_ `string` (default: `<price/>`) - The default order summary item price. - _defaultValue_ `string` (default: `&lt;price/&gt;`) - The default order summary item price.
- _extensions_ `object` (default: `{}`) - The extensions object. - _extensions_ `object` (default: `{}`) - The extensions object.
- _args_ `object` - The arguments object with the following keys: - _args_ `object` - The arguments object with the following keys:
- _cart_ `object` - The cart object from `wc/store/cart`, see [Cart object](#cart-object). - _cart_ `object` - The cart object from `wc/store/cart`, see [Cart object](#cart-object).
- _cartItem_ `object` - The order summary item object from `wc/store/cart`, see [order summary item object](#cart-item-object). - _cartItem_ `object` - The order summary item object from `wc/store/cart`, see [order summary item object](#cart-item-object).
- _context_ `string` (allowed values: `cart` or `summary`) - The context of the item. - _context_ `string` (allowed values: `cart` or `summary`) - The context of the item.
- _validation_ `boolean` - Checks if the return value contains the substring `<price/>`. - _validation_ `boolean` - Checks if the return value contains the substring `&lt;price/&gt;`.
### Returns <!-- omit in toc --> ### Returns <!-- omit in toc -->
- `string` - The modified format of the order summary item price, which must contain the substring `<price/>`, or the original price format. - `string` - The modified format of the order summary item price, which must contain the substring `&lt;price/&gt;`, or the original price format.
### Code examples <!-- omit in toc --> ### Code examples <!-- omit in toc -->
@ -132,7 +132,7 @@ const modifyCartItemPrice = ( defaultValue, extensions, args, validation ) => {
return defaultValue; return defaultValue;
} }
return '<price/> for all items'; return '&lt;price/&gt; for all items';
}; };
registerCheckoutFilters( 'example-extension', { registerCheckoutFilters( 'example-extension', {
@ -153,14 +153,14 @@ const modifyCartItemPrice = ( defaultValue, extensions, args, validation ) => {
} }
if ( args?.cartItem?.name === 'Beanie with Logo' ) { if ( args?.cartItem?.name === 'Beanie with Logo' ) {
return '<price/> to keep you ☀️'; return '&lt;price/&gt; to keep you ☀️';
} }
if ( args?.cartItem?.name === 'Sunglasses' ) { if ( args?.cartItem?.name === 'Sunglasses' ) {
return '<price/> to keep you ❄️'; return '&lt;price/&gt; to keep you ❄️';
} }
return '<price/> for all items'; return '&lt;price/&gt; for all items';
}; };
registerCheckoutFilters( 'example-extension', { registerCheckoutFilters( 'example-extension', {
@ -261,17 +261,17 @@ The `subtotalPriceFormat` filter allows to format the order summary item subtota
### Parameters <!-- omit in toc --> ### Parameters <!-- omit in toc -->
- _defaultValue_ `string` (default: `<price/>`) - The default order summary item subtotal price. - _defaultValue_ `string` (default: `&lt;price/&gt;`) - The default order summary item subtotal price.
- _extensions_ `object` (default: `{}`) - The extensions object. - _extensions_ `object` (default: `{}`) - The extensions object.
- _args_ `object` - The arguments object with the following keys: - _args_ `object` - The arguments object with the following keys:
- _cart_ `object` - The cart object from `wc/store/cart`, see [Cart object](#cart-object). - _cart_ `object` - The cart object from `wc/store/cart`, see [Cart object](#cart-object).
- _cartItem_ `object` - The order summary item object from `wc/store/cart`, see [order summary item object](#cart-item-object). - _cartItem_ `object` - The order summary item object from `wc/store/cart`, see [order summary item object](#cart-item-object).
- _context_ `string` (allowed values: `cart` or `summary`) - The context of the item. - _context_ `string` (allowed values: `cart` or `summary`) - The context of the item.
- _validation_ `boolean` - Checks if the return value contains the substring `<price/>`. - _validation_ `boolean` - Checks if the return value contains the substring `&lt;price/&gt;`.
### Returns <!-- omit in toc --> ### Returns <!-- omit in toc -->
- `string` - The modified format of the order summary item subtotal price, which must contain the substring `<price/>`, or the original price format. - `string` - The modified format of the order summary item subtotal price, which must contain the substring `&lt;price/&gt;`, or the original price format.
### Code examples <!-- omit in toc --> ### Code examples <!-- omit in toc -->
@ -292,7 +292,7 @@ const modifySubtotalPriceFormat = (
return defaultValue; return defaultValue;
} }
return '<price/> per item'; return '&lt;price/&gt; per item';
}; };
registerCheckoutFilters( 'example-extension', { registerCheckoutFilters( 'example-extension', {
@ -318,14 +318,14 @@ const modifySubtotalPriceFormat = (
} }
if ( args?.cartItem?.name === 'Beanie with Logo' ) { if ( args?.cartItem?.name === 'Beanie with Logo' ) {
return '<price/> per warm beanie'; return '&lt;price/&gt; per warm beanie';
} }
if ( args?.cartItem?.name === 'Sunglasses' ) { if ( args?.cartItem?.name === 'Sunglasses' ) {
return '<price/> per cool sunglasses'; return '&lt;price/&gt; per cool sunglasses';
} }
return '<price/> per item'; return '&lt;price/&gt; per item';
}; };
registerCheckoutFilters( 'example-extension', { registerCheckoutFilters( 'example-extension', {

View File

@ -71,11 +71,11 @@ The `totalValue` filter allows to format the total price in the footer of the Ca
- _extensions_ `object` (default: `{}`) - The extensions object. - _extensions_ `object` (default: `{}`) - The extensions object.
- _args_ `object` - The arguments object with the following keys: - _args_ `object` - The arguments object with the following keys:
- _cart_ `object` - The cart object from `wc/store/cart`, see [Cart object](#cart-object). - _cart_ `object` - The cart object from `wc/store/cart`, see [Cart object](#cart-object).
- _validation_ `boolean` - Checks if the return value contains the substring `<price/>`. - _validation_ `boolean` - Checks if the return value contains the substring `&lt;price/&gt;`.
### Returns <!-- omit in toc --> ### Returns <!-- omit in toc -->
- `string` - The modified format of the total price, which must contain the substring `<price/>`, or the original price format. - `string` - The modified format of the total price, which must contain the substring `&lt;price/&gt;`, or the original price format.
### Code example <!-- omit in toc --> ### Code example <!-- omit in toc -->
@ -83,7 +83,7 @@ The `totalValue` filter allows to format the total price in the footer of the Ca
const { registerCheckoutFilters } = window.wc.blocksCheckout; const { registerCheckoutFilters } = window.wc.blocksCheckout;
const modifyTotalsPrice = ( defaultValue, extensions, args, validation ) => { const modifyTotalsPrice = ( defaultValue, extensions, args, validation ) => {
return 'Pay <price/> now'; return 'Pay &lt;price/&gt; now';
}; };
registerCheckoutFilters( 'my-extension', { registerCheckoutFilters( 'my-extension', {

View File

@ -22,11 +22,11 @@ const { ExperimentalOrderMeta } = window.wc.blocksCheckout;
const render = () => { const render = () => {
return ( return (
<ExperimentalOrderMeta> &lt;ExperimentalOrderMeta&gt;
<div class="wc-block-components-totals-wrapper"> &lt;div class="wc-block-components-totals-wrapper"&gt;
{ __( 'Yearly recurring total ...', 'YOUR-TEXTDOMAIN' ) } { __( 'Yearly recurring total ...', 'YOUR-TEXTDOMAIN' ) }
</div> &lt;/div&gt;
</ExperimentalOrderMeta> &lt;/ExperimentalOrderMeta&gt;
); );
}; };
@ -61,9 +61,9 @@ const { ExperimentalOrderShippingPackages } = window.wc.blocksCheckout;
const render = () => { const render = () => {
return ( return (
<ExperimentalOrderShippingPackages> &lt;ExperimentalOrderShippingPackages&gt;
<div>{ __( 'Express Shipping', 'YOUR-TEXTDOMAIN' ) }</div> &lt;div&gt;{ __( 'Express Shipping', 'YOUR-TEXTDOMAIN' ) }&lt;/div&gt;
</ExperimentalOrderShippingPackages> &lt;/ExperimentalOrderShippingPackages&gt;
); );
}; };
@ -104,14 +104,14 @@ const { ExperimentalOrderLocalPickupPackages } = window.wc.blocksCheckout;
const render = () => { const render = () => {
return ( return (
<ExperimentalOrderLocalPickupPackages> &lt;ExperimentalOrderLocalPickupPackages&gt;
<div> &lt;div&gt;
{ __( { __(
'By using our convenient local pickup option, you can come to our store and pick up your order. We will send you and email when your order is ready for pickup.', 'By using our convenient local pickup option, you can come to our store and pick up your order. We will send you and email when your order is ready for pickup.',
'YOUR-TEXTDOMAIN' 'YOUR-TEXTDOMAIN'
) } ) }
</div> &lt;/div&gt;
</ExperimentalOrderLocalPickupPackages> &lt;/ExperimentalOrderLocalPickupPackages&gt;
); );
}; };
@ -143,11 +143,11 @@ const { ExperimentalDiscountsMeta } = window.wc.blocksCheckout;
const render = () => { const render = () => {
return ( return (
<ExperimentalDiscountsMeta> &lt;ExperimentalDiscountsMeta&gt;
<div class="wc-block-components-totals-wrapper"> &lt;div class="wc-block-components-totals-wrapper"&gt;
{ __( 'You have 98683 coins to spend ...', 'YOUR-TEXTDOMAIN' ) } { __( 'You have 98683 coins to spend ...', 'YOUR-TEXTDOMAIN' ) }
</div> &lt;/div&gt;
</ExperimentalDiscountsMeta> &lt;/ExperimentalDiscountsMeta&gt;
); );
}; };

View File

@ -43,8 +43,8 @@ The options you feed the configuration instance should be an object in this shap
```js ```js
const options = { const options = {
name: 'my_payment_method', name: 'my_payment_method',
content: <div>A React node</div>, content: &lt;div&gt;A React node&lt;/div&gt;,
edit: <div>A React node</div>, edit: &lt;div&gt;A React node&lt;/div&gt;,
canMakePayment: () => true, canMakePayment: () => true,
paymentMethodId: 'new_payment_method', paymentMethodId: 'new_payment_method',
supports: { supports: {

View File

@ -32,14 +32,14 @@ const { registerPlugin } = wp.plugins;
const { ExperimentalOrderMeta } = wc.blocksCheckout; const { ExperimentalOrderMeta } = wc.blocksCheckout;
const MyCustomComponent = ( { cart, extensions } ) => { const MyCustomComponent = ( { cart, extensions } ) => {
return <div className="my-component">Hello WooCommerce</div>; return &lt;div className="my-component"&gt;Hello WooCommerce&lt;/div&gt;;
}; };
const render = () => { const render = () => {
return ( return (
<ExperimentalOrderMeta> &lt;ExperimentalOrderMeta&gt;
<MyCustomComponent /> &lt;MyCustomComponent /&gt;
</ExperimentalOrderMeta> &lt;/ExperimentalOrderMeta&gt;
); );
}; };

View File

@ -295,7 +295,7 @@ function custom_override_checkout_fields( $fields ) {
add_action( 'woocommerce_admin_order_data_after_shipping_address', 'my_custom_checkout_field_display_admin_order_meta', 10, 1 ); add_action( 'woocommerce_admin_order_data_after_shipping_address', 'my_custom_checkout_field_display_admin_order_meta', 10, 1 );
function my_custom_checkout_field_display_admin_order_meta($order){ function my_custom_checkout_field_display_admin_order_meta($order){
echo '<p><strong>'. esc_html__( 'Phone From Checkout Form' ) . ':</strong> ' . esc_html( $order->get_meta( '_shipping_phone', true ) ) . '</p>'; echo '&lt;p&gt;&lt;strong&gt;'. esc_html__( 'Phone From Checkout Form' ) . ':&lt;/strong&gt; ' . esc_html( $order->get_meta( '_shipping_phone', true ) ) . '&lt;/p&gt;';
} }
``` ```
@ -317,7 +317,7 @@ add_action( 'woocommerce_after_order_notes', 'my_custom_checkout_field' );
function my_custom_checkout_field( $checkout ) { function my_custom_checkout_field( $checkout ) {
echo '<div id="my_custom_checkout_field"><h2>' . esc_html__( 'My Field' ) . '</h2>'; echo '&lt;div id="my_custom_checkout_field"&gt;&lt;h2&gt;' . esc_html__( 'My Field' ) . '&lt;/h2&gt;';
woocommerce_form_field( woocommerce_form_field(
'my_field_name', 'my_field_name',
@ -330,7 +330,7 @@ function my_custom_checkout_field( $checkout ) {
$checkout->get_value( 'my_field_name' ) $checkout->get_value( 'my_field_name' )
); );
echo '</div>'; echo '&lt;/div&gt;';
} }
``` ```
@ -387,7 +387,7 @@ If you wish to display the custom field value on the admin order edition page, y
add_action( 'woocommerce_admin_order_data_after_billing_address', 'my_custom_checkout_field_display_admin_order_meta', 10, 1 ); add_action( 'woocommerce_admin_order_data_after_billing_address', 'my_custom_checkout_field_display_admin_order_meta', 10, 1 );
function my_custom_checkout_field_display_admin_order_meta( $order ){ function my_custom_checkout_field_display_admin_order_meta( $order ){
echo '<p><strong>' . esc_html__( 'My Field' ) . ':</strong> ' . esc_html( $order->get_meta( 'My Field', true ) ) . '</p>'; echo '&lt;p&gt;&lt;strong&gt;' . esc_html__( 'My Field' ) . ':&lt;/strong&gt; ' . esc_html( $order->get_meta( 'My Field', true ) ) . '&lt;/p&gt;';
} }
``` ```

View File

@ -33,7 +33,7 @@ function woocommerce_custom_field_example() {
$custom_field_value = get_post_meta( $product->get_id(), 'woo_custom_field', true ); $custom_field_value = get_post_meta( $product->get_id(), 'woo_custom_field', true );
if ( ! empty( $custom_field_value ) ) { if ( ! empty( $custom_field_value ) ) {
echo '<div class="custom-field">' . esc_html( $custom_field_value ) . '</div>'; echo '&lt;div class="custom-field"&gt;' . esc_html( $custom_field_value ) . '&lt;/div&gt;';
} }
} }

View File

@ -19,7 +19,7 @@ if ( defined( 'WC_LOG_DIR' ) ) {
$log_url = add_query_arg( 'log_file', $log_key, $log_url ); $log_url = add_query_arg( 'log_file', $log_key, $log_url );
// Add a link to the logs to the label // Add a link to the logs to the label
$label .= ' | ' . sprintf( \_\_( '%1$sView Log%2$s', 'your-textdomain-here' ), '<a href\="' . esc_url( $log_url ) . '">', '</a\>' ); $label .= ' | ' . sprintf( \_\_( '%1$sView Log%2$s', 'your-textdomain-here' ), '&lt;a href\="' . esc_url( $log_url ) . '"&gt;', '&lt;/a\&gt;' );
} }
// Add the logging option to the form fields // Add the logging option to the form fields

View File

@ -100,7 +100,7 @@
"menu_title": "Slot and Fill", "menu_title": "Slot and Fill",
"tags": "reference", "tags": "reference",
"edit_url": "https://github.com/woocommerce/woocommerce/edit/trunk/docs/cart-and-checkout-blocks/slot-fills.md", "edit_url": "https://github.com/woocommerce/woocommerce/edit/trunk/docs/cart-and-checkout-blocks/slot-fills.md",
"hash": "f83a5fbef86e5ef6b0ec1d63fdbcbf4742f54de1125e535fa0f32f5f80ec794a", "hash": "a232ca3d53f10857170113f6dc5b37ac7ae629e852629bac015a8d3c2cd1bbc4",
"url": "https://raw.githubusercontent.com/woocommerce/woocommerce/trunk/docs/cart-and-checkout-blocks/slot-fills.md", "url": "https://raw.githubusercontent.com/woocommerce/woocommerce/trunk/docs/cart-and-checkout-blocks/slot-fills.md",
"id": "e388101586765dd9aca752d66d667d74951a1504" "id": "e388101586765dd9aca752d66d667d74951a1504"
}, },
@ -136,7 +136,7 @@
"menu_title": "Available Slots", "menu_title": "Available Slots",
"tags": "reference", "tags": "reference",
"edit_url": "https://github.com/woocommerce/woocommerce/edit/trunk/docs/cart-and-checkout-blocks/available-slot-fills.md", "edit_url": "https://github.com/woocommerce/woocommerce/edit/trunk/docs/cart-and-checkout-blocks/available-slot-fills.md",
"hash": "770da9156eea1fdc24db0736ce4ccd44ebde4f3b0373cd875b1ae88d4d9c8a49", "hash": "444d9892cb6552c8394ecdf81816952987b59bc79fa53f3083c3d14a89d1e961",
"url": "https://raw.githubusercontent.com/woocommerce/woocommerce/trunk/docs/cart-and-checkout-blocks/available-slot-fills.md", "url": "https://raw.githubusercontent.com/woocommerce/woocommerce/trunk/docs/cart-and-checkout-blocks/available-slot-fills.md",
"id": "c7ac16eee5540b06b6db928f5d03282ff177e84e" "id": "c7ac16eee5540b06b6db928f5d03282ff177e84e"
}, },
@ -145,14 +145,14 @@
"menu_title": "Additional Checkout Fields", "menu_title": "Additional Checkout Fields",
"tags": "reference", "tags": "reference",
"edit_url": "https://github.com/woocommerce/woocommerce/edit/trunk/docs/cart-and-checkout-blocks/additional-checkout-fields.md", "edit_url": "https://github.com/woocommerce/woocommerce/edit/trunk/docs/cart-and-checkout-blocks/additional-checkout-fields.md",
"hash": "1b034ede098b933b6b00a9a27ba33e418b1c88c4883e2b9b191092e32866f7b9", "hash": "641615864f627be4bb42574df378cea91f4a7fda9edab099558bad06b92ce62d",
"url": "https://raw.githubusercontent.com/woocommerce/woocommerce/trunk/docs/cart-and-checkout-blocks/additional-checkout-fields.md", "url": "https://raw.githubusercontent.com/woocommerce/woocommerce/trunk/docs/cart-and-checkout-blocks/additional-checkout-fields.md",
"id": "cb5dd8d59043a4e53929121b45da7b33b1661ab8" "id": "cb5dd8d59043a4e53929121b45da7b33b1661ab8"
} }
], ],
"categories": [ "categories": [
{ {
"content": "\nThis document lists the filters that are currently available to extensions and offers usage information for each one of them. Information on registering filters can be found on the [Checkout - Filter Registry](https://github.com/woocommerce/woocommerce/blob/trunk/plugins/woocommerce-blocks/packages/checkout/filter-registry/README.md) page.\n\n## Cart Line Items filters\n\nThe following [Cart Line Items filters](./cart-line-items.md) are available:\n\n- `cartItemClass`\n- `cartItemPrice`\n- `itemName`\n- `saleBadgePriceFormat`\n- `showRemoveItemLink`\n- `subtotalPriceFormat`\n\nThe following screenshot shows which parts the individual filters affect:\n\n![Cart Line Items](https://woocommerce.com/wp-content/uploads/2023/10/Screenshot-2023-10-26-at-13.12.33.png)\n\n## Order Summary Items filters\n\nThe following [Order Summary Items filters](./order-summary-items.md) are available:\n\n- `cartItemClass`\n- `cartItemPrice`\n- `itemName`\n- `subtotalPriceFormat`\n\nThe following screenshot shows which parts the individual filters affect:\n\n![Order Summary Items](https://woocommerce.com/wp-content/uploads/2023/10/Screenshot-2023-10-26-at-16.29.45.png)\n\n## Totals Footer Item filter\n\nThe following [Totals Footer Item filter](./totals-footer-item.md) is available:\n\n- `totalLabel`\n- `totalValue`\n\n## Checkout and place order button filters\n\nThe following [Checkout and place order button filters](./checkout-and-place-order-button.md) are available:\n\n- `proceedToCheckoutButtonLabel`\n- `proceedToCheckoutButtonLink`\n- `placeOrderButtonLabel`\n\n## Coupon filters\n\nThe following [Coupon filters](./coupons.md) are available:\n\n- `coupons`\n- `showApplyCouponNotice`\n- `showRemoveCouponNotice`\n\n## Additional Cart and Checkout inner block types filter\n\nThe following [Additional Cart and Checkout inner block types filter](./additional-cart-checkout-inner-block-types.md) is available:\n\n- `additionalCartCheckoutInnerBlockTypes`\n\n## Combined filters\n\nFilters can also be combined. The following example shows how to combine some of the available filters.\n\n```tsx\nconst { registerCheckoutFilters } = window.wc.blocksCheckout;\n\nconst isOrderSummaryContext = ( args ) => args?.context === 'summary';\n\nconst modifyCartItemClass = ( defaultValue, extensions, args ) => {\n\tif ( isOrderSummaryContext( args ) ) {\n\t\treturn 'my-custom-class';\n\t}\n\treturn defaultValue;\n};\n\nconst modifyCartItemPrice = ( defaultValue, extensions, args ) => {\n\tif ( isOrderSummaryContext( args ) ) {\n\t\treturn '<price/> for all items';\n\t}\n\treturn defaultValue;\n};\n\nconst modifyItemName = ( defaultValue, extensions, args ) => {\n\tif ( isOrderSummaryContext( args ) ) {\n\t\treturn `${ defaultValue }`;\n\t}\n\treturn defaultValue;\n};\n\nconst modifySubtotalPriceFormat = ( defaultValue, extensions, args ) => {\n\tif ( isOrderSummaryContext( args ) ) {\n\t\treturn '<price/> per item';\n\t}\n\treturn defaultValue;\n};\n\nregisterCheckoutFilters( 'example-extension', {\n\tcartItemClass: modifyCartItemClass,\n\tcartItemPrice: modifyCartItemPrice,\n\titemName: modifyItemName,\n\tsubtotalPriceFormat: modifySubtotalPriceFormat,\n} );\n```\n\n## Troubleshooting\n\nIf you are logged in to the store as an administrator, you should be shown an error like this if your filter is not\nworking correctly. The error will also be shown in your console.\n\n![Troubleshooting](https://woocommerce.com/wp-content/uploads/2023/10/Screenshot-2023-10-30-at-10.52.53.png)\n\n\n", "content": "\nThis document lists the filters that are currently available to extensions and offers usage information for each one of them. Information on registering filters can be found on the [Checkout - Filter Registry](https://github.com/woocommerce/woocommerce/blob/trunk/plugins/woocommerce-blocks/packages/checkout/filter-registry/README.md) page.\n\n## Cart Line Items filters\n\nThe following [Cart Line Items filters](./cart-line-items.md) are available:\n\n- `cartItemClass`\n- `cartItemPrice`\n- `itemName`\n- `saleBadgePriceFormat`\n- `showRemoveItemLink`\n- `subtotalPriceFormat`\n\nThe following screenshot shows which parts the individual filters affect:\n\n![Cart Line Items](https://woocommerce.com/wp-content/uploads/2023/10/Screenshot-2023-10-26-at-13.12.33.png)\n\n## Order Summary Items filters\n\nThe following [Order Summary Items filters](./order-summary-items.md) are available:\n\n- `cartItemClass`\n- `cartItemPrice`\n- `itemName`\n- `subtotalPriceFormat`\n\nThe following screenshot shows which parts the individual filters affect:\n\n![Order Summary Items](https://woocommerce.com/wp-content/uploads/2023/10/Screenshot-2023-10-26-at-16.29.45.png)\n\n## Totals Footer Item filter\n\nThe following [Totals Footer Item filter](./totals-footer-item.md) is available:\n\n- `totalLabel`\n- `totalValue`\n\n## Checkout and place order button filters\n\nThe following [Checkout and place order button filters](./checkout-and-place-order-button.md) are available:\n\n- `proceedToCheckoutButtonLabel`\n- `proceedToCheckoutButtonLink`\n- `placeOrderButtonLabel`\n\n## Coupon filters\n\nThe following [Coupon filters](./coupons.md) are available:\n\n- `coupons`\n- `showApplyCouponNotice`\n- `showRemoveCouponNotice`\n\n## Additional Cart and Checkout inner block types filter\n\nThe following [Additional Cart and Checkout inner block types filter](./additional-cart-checkout-inner-block-types.md) is available:\n\n- `additionalCartCheckoutInnerBlockTypes`\n\n## Combined filters\n\nFilters can also be combined. The following example shows how to combine some of the available filters.\n\n```tsx\nconst { registerCheckoutFilters } = window.wc.blocksCheckout;\n\nconst isOrderSummaryContext = ( args ) => args?.context === 'summary';\n\nconst modifyCartItemClass = ( defaultValue, extensions, args ) => {\n\tif ( isOrderSummaryContext( args ) ) {\n\t\treturn 'my-custom-class';\n\t}\n\treturn defaultValue;\n};\n\nconst modifyCartItemPrice = ( defaultValue, extensions, args ) => {\n\tif ( isOrderSummaryContext( args ) ) {\n\t\treturn '&lt;price/&gt; for all items';\n\t}\n\treturn defaultValue;\n};\n\nconst modifyItemName = ( defaultValue, extensions, args ) => {\n\tif ( isOrderSummaryContext( args ) ) {\n\t\treturn `${ defaultValue }`;\n\t}\n\treturn defaultValue;\n};\n\nconst modifySubtotalPriceFormat = ( defaultValue, extensions, args ) => {\n\tif ( isOrderSummaryContext( args ) ) {\n\t\treturn '&lt;price/&gt; per item';\n\t}\n\treturn defaultValue;\n};\n\nregisterCheckoutFilters( 'example-extension', {\n\tcartItemClass: modifyCartItemClass,\n\tcartItemPrice: modifyCartItemPrice,\n\titemName: modifyItemName,\n\tsubtotalPriceFormat: modifySubtotalPriceFormat,\n} );\n```\n\n## Troubleshooting\n\nIf you are logged in to the store as an administrator, you should be shown an error like this if your filter is not\nworking correctly. The error will also be shown in your console.\n\n![Troubleshooting](https://woocommerce.com/wp-content/uploads/2023/10/Screenshot-2023-10-30-at-10.52.53.png)\n\n\n",
"category_slug": "cart-and-checkout-available-filters", "category_slug": "cart-and-checkout-available-filters",
"category_title": "Available Filters", "category_title": "Available Filters",
"posts": [ "posts": [
@ -161,7 +161,7 @@
"menu_title": "Totals Footer Item", "menu_title": "Totals Footer Item",
"tags": "reference", "tags": "reference",
"edit_url": "https://github.com/woocommerce/woocommerce/edit/trunk/docs/cart-and-checkout-blocks/available-filters/totals-footer-item.md", "edit_url": "https://github.com/woocommerce/woocommerce/edit/trunk/docs/cart-and-checkout-blocks/available-filters/totals-footer-item.md",
"hash": "3a9869d7d7beadb8117c100c3b58675e416e16386ee753f78e1a9087e768053f", "hash": "6cf668422809b036dca7c1996ae907497a38631dd5bfb7e67d6bf3620425e411",
"url": "https://raw.githubusercontent.com/woocommerce/woocommerce/trunk/docs/cart-and-checkout-blocks/available-filters/totals-footer-item.md", "url": "https://raw.githubusercontent.com/woocommerce/woocommerce/trunk/docs/cart-and-checkout-blocks/available-filters/totals-footer-item.md",
"id": "90a9b8df374082f1713866a58b810303adb4d3da" "id": "90a9b8df374082f1713866a58b810303adb4d3da"
}, },
@ -170,7 +170,7 @@
"menu_title": "Order Summary Items", "menu_title": "Order Summary Items",
"tags": "reference", "tags": "reference",
"edit_url": "https://github.com/woocommerce/woocommerce/edit/trunk/docs/cart-and-checkout-blocks/available-filters/order-summary-items.md", "edit_url": "https://github.com/woocommerce/woocommerce/edit/trunk/docs/cart-and-checkout-blocks/available-filters/order-summary-items.md",
"hash": "36f1bfa8d192b106d28d71334b42413d4c289a0a8d1f5b76b2f905d6fa453883", "hash": "1796f53f3d67dd6b47fe8d7f67cbd69bddcaa6416bb5a0cc1a0fc99f42ea9d10",
"url": "https://raw.githubusercontent.com/woocommerce/woocommerce/trunk/docs/cart-and-checkout-blocks/available-filters/order-summary-items.md", "url": "https://raw.githubusercontent.com/woocommerce/woocommerce/trunk/docs/cart-and-checkout-blocks/available-filters/order-summary-items.md",
"id": "78eb3b135f82a3624a49979e3e93334295abd060" "id": "78eb3b135f82a3624a49979e3e93334295abd060"
}, },
@ -223,7 +223,7 @@
"menu_title": "Payment Method Integration", "menu_title": "Payment Method Integration",
"tags": "reference", "tags": "reference",
"edit_url": "https://github.com/woocommerce/woocommerce/edit/trunk/docs/cart-and-checkout-blocks/checkout-payment-methods/payment-method-integration.md", "edit_url": "https://github.com/woocommerce/woocommerce/edit/trunk/docs/cart-and-checkout-blocks/checkout-payment-methods/payment-method-integration.md",
"hash": "f60acaaea4a6ac4adf637bc7069c966e01db089f9dfaa937def91165a71a4255", "hash": "138ffbf27e79ec8b35d2c46e87e3663c203d91fc9ba3f76c43f3cbe76258e5bf",
"url": "https://raw.githubusercontent.com/woocommerce/woocommerce/trunk/docs/cart-and-checkout-blocks/checkout-payment-methods/payment-method-integration.md", "url": "https://raw.githubusercontent.com/woocommerce/woocommerce/trunk/docs/cart-and-checkout-blocks/checkout-payment-methods/payment-method-integration.md",
"id": "c9a763b6976ecf03aeb961577c17c31f1ac7c420", "id": "c9a763b6976ecf03aeb961577c17c31f1ac7c420",
"links": { "links": {
@ -363,7 +363,7 @@
"menu_title": "Add link to logged data", "menu_title": "Add link to logged data",
"tags": "code-snippets", "tags": "code-snippets",
"edit_url": "https://github.com/woocommerce/woocommerce/edit/trunk/docs/code-snippets/link-to-logged-data.md", "edit_url": "https://github.com/woocommerce/woocommerce/edit/trunk/docs/code-snippets/link-to-logged-data.md",
"hash": "fd1c3a58da8b7eed11da841d901b4d3cc117c6753c3b3834f3de41ea266490b9", "hash": "4e51c120a6ea7b14c0e43f11e8eb1b785e4447fbe2b997f5789f10b57c485137",
"url": "https://raw.githubusercontent.com/woocommerce/woocommerce/trunk/docs/code-snippets/link-to-logged-data.md", "url": "https://raw.githubusercontent.com/woocommerce/woocommerce/trunk/docs/code-snippets/link-to-logged-data.md",
"id": "34da337f79be5ce857024f541a99d302174ca37d" "id": "34da337f79be5ce857024f541a99d302174ca37d"
}, },
@ -389,7 +389,7 @@
"menu_title": "Displaying custom fields in theme", "menu_title": "Displaying custom fields in theme",
"tags": "code-snippet", "tags": "code-snippet",
"edit_url": "https://github.com/woocommerce/woocommerce/edit/trunk/docs/code-snippets/displaying_custom_fields_in_your_theme_or_site.md", "edit_url": "https://github.com/woocommerce/woocommerce/edit/trunk/docs/code-snippets/displaying_custom_fields_in_your_theme_or_site.md",
"hash": "8048c2e9e5d25268d17d4f4ca7929e265eddbd4653318dd8f544856ddecd39dd", "hash": "013acf9daaef92daf49e49315b2c0eba730b96adb8078eaab1146db4afc5270b",
"url": "https://raw.githubusercontent.com/woocommerce/woocommerce/trunk/docs/code-snippets/displaying_custom_fields_in_your_theme_or_site.md", "url": "https://raw.githubusercontent.com/woocommerce/woocommerce/trunk/docs/code-snippets/displaying_custom_fields_in_your_theme_or_site.md",
"id": "3e3fd004afda355cf9dbb05f0967523d6d0da1ce" "id": "3e3fd004afda355cf9dbb05f0967523d6d0da1ce"
}, },
@ -405,7 +405,7 @@
"post_title": "Customizing checkout fields using actions and filters", "post_title": "Customizing checkout fields using actions and filters",
"tags": "code-snippet", "tags": "code-snippet",
"edit_url": "https://github.com/woocommerce/woocommerce/edit/trunk/docs/code-snippets/customising-checkout-fields.md", "edit_url": "https://github.com/woocommerce/woocommerce/edit/trunk/docs/code-snippets/customising-checkout-fields.md",
"hash": "8bbfe162402e484ae89427e1aedaed4faa57555b64b5a77ca800f701524314cb", "hash": "ce63f640d5b91d85c3bbb80128d8a19e9c00d1c0e252abd4f958e29dcc1e60ce",
"url": "https://raw.githubusercontent.com/woocommerce/woocommerce/trunk/docs/code-snippets/customising-checkout-fields.md", "url": "https://raw.githubusercontent.com/woocommerce/woocommerce/trunk/docs/code-snippets/customising-checkout-fields.md",
"id": "83097d3b7414557fc80dcf9f8f1a708bbdcdd884" "id": "83097d3b7414557fc80dcf9f8f1a708bbdcdd884"
}, },
@ -676,7 +676,7 @@
{ {
"post_title": "Settings API", "post_title": "Settings API",
"edit_url": "https://github.com/woocommerce/woocommerce/edit/trunk/docs/extension-development/settings-api.md", "edit_url": "https://github.com/woocommerce/woocommerce/edit/trunk/docs/extension-development/settings-api.md",
"hash": "ca80728c56d60bb7416bb2865678b9e04807d0e208a4df56b8efaf32e9ac465d", "hash": "9015453d8be72871bb26a450b86e542aa698c67b93284a04cd2b18008113bf43",
"url": "https://raw.githubusercontent.com/woocommerce/woocommerce/trunk/docs/extension-development/settings-api.md", "url": "https://raw.githubusercontent.com/woocommerce/woocommerce/trunk/docs/extension-development/settings-api.md",
"id": "ed56b97b9de350074a302373ebaaa5dcce727e8b" "id": "ed56b97b9de350074a302373ebaaa5dcce727e8b"
}, },
@ -691,7 +691,7 @@
"post_title": "Integrating with coming soon mode", "post_title": "Integrating with coming soon mode",
"tags": "how-to, coming-soon", "tags": "how-to, coming-soon",
"edit_url": "https://github.com/woocommerce/woocommerce/edit/trunk/docs/extension-development/integrating-coming-soon-mode.md", "edit_url": "https://github.com/woocommerce/woocommerce/edit/trunk/docs/extension-development/integrating-coming-soon-mode.md",
"hash": "8c2087952ae79bb4c3e3977c57d9e933fcfaa418a5bc643b3827059daa5879a7", "hash": "791cd6d3928b3aafc72a24d0283a404a90a0f021c7c36edaa445eb44978114a3",
"url": "https://raw.githubusercontent.com/woocommerce/woocommerce/trunk/docs/extension-development/integrating-coming-soon-mode.md", "url": "https://raw.githubusercontent.com/woocommerce/woocommerce/trunk/docs/extension-development/integrating-coming-soon-mode.md",
"id": "787743efb6ef0ad509b17735eaf58b2a9a08afbc" "id": "787743efb6ef0ad509b17735eaf58b2a9a08afbc"
}, },
@ -700,7 +700,7 @@
"menu_title": "Creating custom settings", "menu_title": "Creating custom settings",
"tags": "how-to", "tags": "how-to",
"edit_url": "https://github.com/woocommerce/woocommerce/edit/trunk/docs/extension-development/implementing-settings.md", "edit_url": "https://github.com/woocommerce/woocommerce/edit/trunk/docs/extension-development/implementing-settings.md",
"hash": "604d455f9e413c23a208c174ba25611c333e02eef0bafb0d38253f8dd8e3a04c", "hash": "5cab83a84bb7eb11090bac244754fdae1f8aef1030850d12c29c09054c50bc61",
"url": "https://raw.githubusercontent.com/woocommerce/woocommerce/trunk/docs/extension-development/implementing-settings.md", "url": "https://raw.githubusercontent.com/woocommerce/woocommerce/trunk/docs/extension-development/implementing-settings.md",
"id": "58bcbd3a0cd3b3e5fe738c3bb625cf9b7747c99a" "id": "58bcbd3a0cd3b3e5fe738c3bb625cf9b7747c99a"
}, },
@ -814,7 +814,7 @@
"menu_title": "Add custom product types to Add Products onboarding list", "menu_title": "Add custom product types to Add Products onboarding list",
"tags": "how-to", "tags": "how-to",
"edit_url": "https://github.com/woocommerce/woocommerce/edit/trunk/docs/extension-development/adding-custom-products-to-add-products-onboarding-list.md", "edit_url": "https://github.com/woocommerce/woocommerce/edit/trunk/docs/extension-development/adding-custom-products-to-add-products-onboarding-list.md",
"hash": "60e50ef5d7e2ac6d0745c31031140df1dbb3c1b8724230cab1eaedebe3814688", "hash": "92a8e17f2cd8dc32a78f03970ded1beec2fd60cadbf14c8cefcabbf7abae59c5",
"url": "https://raw.githubusercontent.com/woocommerce/woocommerce/trunk/docs/extension-development/adding-custom-products-to-add-products-onboarding-list.md", "url": "https://raw.githubusercontent.com/woocommerce/woocommerce/trunk/docs/extension-development/adding-custom-products-to-add-products-onboarding-list.md",
"id": "747321d7fd2eb5c9c3351ea38374dfc80d3ec968" "id": "747321d7fd2eb5c9c3351ea38374dfc80d3ec968"
}, },
@ -861,7 +861,7 @@
"menu_title": "Troubleshooting Endpoints", "menu_title": "Troubleshooting Endpoints",
"tags": "how-to", "tags": "how-to",
"edit_url": "https://github.com/woocommerce/woocommerce/edit/trunk/docs/getting-started/troubleshooting-endpoints.md", "edit_url": "https://github.com/woocommerce/woocommerce/edit/trunk/docs/getting-started/troubleshooting-endpoints.md",
"hash": "1a015d82f4d82cc2d9f13f188f03c4e6e03b98ea9d22c5a7710547e7d3c8c78f", "hash": "448bcd827ff44e9eb10d039bfd933cd63a37df05bd694bf80f9d9f978a3afdf5",
"url": "https://raw.githubusercontent.com/woocommerce/woocommerce/trunk/docs/getting-started/troubleshooting-endpoints.md", "url": "https://raw.githubusercontent.com/woocommerce/woocommerce/trunk/docs/getting-started/troubleshooting-endpoints.md",
"id": "dff57bd736ae83850bfc7e4ac994bd22141d96ee", "id": "dff57bd736ae83850bfc7e4ac994bd22141d96ee",
"links": { "links": {
@ -903,7 +903,7 @@
"menu_title": "Customizing Endpoint URLs", "menu_title": "Customizing Endpoint URLs",
"tags": "how-to", "tags": "how-to",
"edit_url": "https://github.com/woocommerce/woocommerce/edit/trunk/docs/getting-started/customizing-endpoint-urls.md", "edit_url": "https://github.com/woocommerce/woocommerce/edit/trunk/docs/getting-started/customizing-endpoint-urls.md",
"hash": "7feda75b07a1c11d533afabc7781abb80438ce2fa2c3fb37c173e1275098e720", "hash": "364ed14d70c49498ba5017104b9c83743322d5095c215262d4311866a76181e5",
"url": "https://raw.githubusercontent.com/woocommerce/woocommerce/trunk/docs/getting-started/customizing-endpoint-urls.md", "url": "https://raw.githubusercontent.com/woocommerce/woocommerce/trunk/docs/getting-started/customizing-endpoint-urls.md",
"id": "c19e1b1da6543f8a95ee04ba120f4f171f8e6e40", "id": "c19e1b1da6543f8a95ee04ba120f4f171f8e6e40",
"links": { "links": {
@ -956,7 +956,7 @@
"post_title": "HPOS CLI Tools", "post_title": "HPOS CLI Tools",
"tags": "reference", "tags": "reference",
"edit_url": "https://github.com/woocommerce/woocommerce/edit/trunk/docs/high-performance-order-storage/cli-tools.md", "edit_url": "https://github.com/woocommerce/woocommerce/edit/trunk/docs/high-performance-order-storage/cli-tools.md",
"hash": "8cd823759ce20551d582c39f57ae79f9e0227a8cb0131146e6b7dac5e7312708", "hash": "63e5edd55720c963de6700854515ea51946ff734b716ab61793955308b72af91",
"url": "https://raw.githubusercontent.com/woocommerce/woocommerce/trunk/docs/high-performance-order-storage/cli-tools.md", "url": "https://raw.githubusercontent.com/woocommerce/woocommerce/trunk/docs/high-performance-order-storage/cli-tools.md",
"id": "cdd9d9ad5777d978ba953e3478fbb61cab8fdf59" "id": "cdd9d9ad5777d978ba953e3478fbb61cab8fdf59"
} }
@ -1050,7 +1050,7 @@
"menu_title": "Registering custom collections", "menu_title": "Registering custom collections",
"tags": "how-to", "tags": "how-to",
"edit_url": "https://github.com/woocommerce/woocommerce/edit/trunk/docs/product-collection-block/register-product-collection.md", "edit_url": "https://github.com/woocommerce/woocommerce/edit/trunk/docs/product-collection-block/register-product-collection.md",
"hash": "27c321bed35524d74019e015f5eed6cdca7e6c2efe0bc89ffdd2b9b5d43c47e8", "hash": "6d32bc27924226b032e03624dbeedde3c899c2e8eb777a1fece93bed99544f03",
"url": "https://raw.githubusercontent.com/woocommerce/woocommerce/trunk/docs/product-collection-block/register-product-collection.md", "url": "https://raw.githubusercontent.com/woocommerce/woocommerce/trunk/docs/product-collection-block/register-product-collection.md",
"id": "3bf26fc7c56ae6e6a56e1171f750f5204fcfcece" "id": "3bf26fc7c56ae6e6a56e1171f750f5204fcfcece"
}, },
@ -1117,7 +1117,7 @@
{ {
"post_title": "Extending the product form with custom fields", "post_title": "Extending the product form with custom fields",
"edit_url": "https://github.com/woocommerce/woocommerce/edit/trunk/docs/product-editor-development/how-to-guides/custom-field-tutorial.md", "edit_url": "https://github.com/woocommerce/woocommerce/edit/trunk/docs/product-editor-development/how-to-guides/custom-field-tutorial.md",
"hash": "f0d0273c0d65739d605448492bfbe684f0ed33f9e6e274df06f26e83cb6ba341", "hash": "dfa00ed71af6eda1f539684657d5c880850ececea4c07bd11e89a605fab77ec7",
"url": "https://raw.githubusercontent.com/woocommerce/woocommerce/trunk/docs/product-editor-development/how-to-guides/custom-field-tutorial.md", "url": "https://raw.githubusercontent.com/woocommerce/woocommerce/trunk/docs/product-editor-development/how-to-guides/custom-field-tutorial.md",
"id": "fed80efbb225df9054fadd6e1fc45c2cd03e7f99" "id": "fed80efbb225df9054fadd6e1fc45c2cd03e7f99"
} }
@ -1329,7 +1329,7 @@
"menu_title": "Extend analytics reports", "menu_title": "Extend analytics reports",
"tags": "how-to", "tags": "how-to",
"edit_url": "https://github.com/woocommerce/woocommerce/edit/trunk/docs/reporting/extending-woocommerce-admin-reports.md", "edit_url": "https://github.com/woocommerce/woocommerce/edit/trunk/docs/reporting/extending-woocommerce-admin-reports.md",
"hash": "b694b0e857d3ca60acdef2ffaae329a93f0a0243eacc4b192562c7f507f169b3", "hash": "56712b3583d0b0a4d96eb19153e5abcb8a386fcd083fa56481acf1be530afa25",
"url": "https://raw.githubusercontent.com/woocommerce/woocommerce/trunk/docs/reporting/extending-woocommerce-admin-reports.md", "url": "https://raw.githubusercontent.com/woocommerce/woocommerce/trunk/docs/reporting/extending-woocommerce-admin-reports.md",
"id": "3ef20148084c97d7f62b565b92df844392ac27f7" "id": "3ef20148084c97d7f62b565b92df844392ac27f7"
}, },
@ -1498,7 +1498,7 @@
"post_title": "Classic theme development handbook", "post_title": "Classic theme development handbook",
"menu_title": "Classic theme development", "menu_title": "Classic theme development",
"edit_url": "https://github.com/woocommerce/woocommerce/edit/trunk/docs/theme-development/classic-theme-developer-handbook.md", "edit_url": "https://github.com/woocommerce/woocommerce/edit/trunk/docs/theme-development/classic-theme-developer-handbook.md",
"hash": "1194437fbc2ec82d60c8b73a9742ec650bd90fe734758c3a2b27ed852d4d14f7", "hash": "95ce7250479a5133bba6c68939d86e4e79708c65044d70727c73f6a88f716da7",
"url": "https://raw.githubusercontent.com/woocommerce/woocommerce/trunk/docs/theme-development/classic-theme-developer-handbook.md", "url": "https://raw.githubusercontent.com/woocommerce/woocommerce/trunk/docs/theme-development/classic-theme-developer-handbook.md",
"id": "c2fde53e1dc3efbded3cfe1fb4df27136a3799a4" "id": "c2fde53e1dc3efbded3cfe1fb4df27136a3799a4"
} }
@ -1775,7 +1775,7 @@
"menu_title": "Commands", "menu_title": "Commands",
"tags": "reference", "tags": "reference",
"edit_url": "https://github.com/woocommerce/woocommerce/edit/trunk/docs/wc-cli/wc-cli-commands.md", "edit_url": "https://github.com/woocommerce/woocommerce/edit/trunk/docs/wc-cli/wc-cli-commands.md",
"hash": "a926ff45642539e0edc6b4e3dfeba4b31c2d01082700af132a2e8d56cfa25ec5", "hash": "17bbb18fd0ad0523a5b864f74acbec64c853ae7b42ecd7e6d9dbce1fbe2669aa",
"url": "https://raw.githubusercontent.com/woocommerce/woocommerce/trunk/docs/wc-cli/wc-cli-commands.md", "url": "https://raw.githubusercontent.com/woocommerce/woocommerce/trunk/docs/wc-cli/wc-cli-commands.md",
"id": "73d6bc6468d23a9e93d16d574399105b143e43af" "id": "73d6bc6468d23a9e93d16d574399105b143e43af"
}, },
@ -1804,5 +1804,5 @@
"categories": [] "categories": []
} }
], ],
"hash": "ffae56d5a4993b151a54ec2117be1acf6a02c9fcab5b5662a2a583ea0e743f1d" "hash": "1f651a59399c34644d2f91a0366bbd01da2c7dc677a1c53329b184badd3b8d13"
} }

View File

@ -45,8 +45,8 @@ addFilter(
key: 'custom-product', key: 'custom-product',
title: __('Custom product', 'custom-product'), title: __('Custom product', 'custom-product'),
content: __('Create an awesome custom product.', 'custom-product'), content: __('Create an awesome custom product.', 'custom-product'),
before: <FolderMultipleIcon />, before: &lt;FolderMultipleIcon /&gt;,
after: <Icon icon={chevronRight} />, after: &lt;Icon icon={chevronRight} /&gt;,
onClick: () => { onClick: () => {
} }
}, },

View File

@ -227,19 +227,19 @@ public function generate_button_html( $key, $data ) {
ob_start(); ob_start();
?> ?>
<tr valign="top"> &lt;tr valign="top"&gt;
<th scope="row" class="titledesc"> &lt;th scope="row" class="titledesc"&gt;
<label for="<?php echo esc_attr( $field ); ?>"><?php echo wp_kses_post( $data['title'] ); ?></label> &lt;label for="<?php echo esc_attr( $field ); ?>"><?php echo wp_kses_post( $data['title'] ); ?>&lt;/label&gt;
<?php echo $this->get_tooltip_html( $data ); ?> <?php echo $this->get_tooltip_html( $data ); ?>
</th> &lt;/th&gt;
<td class="forminp"> &lt;td class="forminp"&gt;
<fieldset> &lt;fieldset&lt;
<legend class="screen-reader-text"><span><?php echo wp_kses_post( $data['title'] ); ?></span></legend> &lt;legend class="screen-reader-text"&gt;&lt;span&gt;<?php echo wp_kses_post( $data['title'] ); ?&gt;&lt;/span&gt;&lt;/legend&gt;
<button class="<?php echo esc_attr( $data['class'] ); ?>" type="button" name="<?php echo esc_attr( $field ); ?>" id="<?php echo esc_attr( $field ); ?>" style="<?php echo esc_attr( $data['css'] ); ?>" <?php echo $this->get_custom_attribute_html( $data ); ?>><?php echo wp_kses_post( $data['title'] ); ?></button> &lt;button class="<?php echo esc_attr( $data['class'] ); ?>" type="button" name="<?php echo esc_attr( $field ); ?>" id="<?php echo esc_attr( $field ); ?>" style="<?php echo esc_attr( $data['css'] ); ?>" <?php echo $this->get_custom_attribute_html( $data ); ?>&gt;<?php echo wp_kses_post( $data['title'] ); ?>&lt;/button&gt;
<?php echo $this->get_description_html( $data ); ?> <?php echo $this->get_description_html( $data ); ?>
</fieldset> &lt;/fieldset&gt;
</td> &lt;/td&gt;
</tr> &lt;/tr&gt;
<?php <?php
return ob_get_clean(); return ob_get_clean();
} }

View File

@ -160,7 +160,7 @@ Use the following example to exclude a certain page based on the page's ID. Repl
```php ```php
add_filter( 'woocommerce_coming_soon_exclude', function( $is_excluded ) { add_filter( 'woocommerce_coming_soon_exclude', function( $is_excluded ) {
if ( get_the_ID() === <page-id> ) { if ( get_the_ID() === &lt;page-id&gt; ) {
return true; return true;
} }
return $is_excluded; return $is_excluded;

View File

@ -70,10 +70,10 @@ Create a method called `admin_options` containing the following:
```php ```php
function admin_options() { function admin_options() {
?> ?>
<h2><?php esc_html_e( 'Your plugin name', 'your-text-domain' ); ?></h2> &lt;h2&gt;<?php esc_html_e( 'Your plugin name', 'your-text-domain' ); ?>&lt;/h2&gt;
<table class="form-table"> &lt;table class="form-table"&gt;
<?php $this->generate_settings_html(); ?> <?php $this->generate_settings_html(); ?>
</table> &lt;/table&gt;
<?php <?php
} }
``` ```

View File

@ -48,24 +48,24 @@ Gateways need to use these methods for full 2.1+ compatibility.
On Windows servers, the **web.config** file may not be set correctly to allow for the endpoints to work correctly. In this case, clicking on endpoint links (e.g. /edit-account/ or /customer-logout/) may appear to do nothing except refresh the page. In order to resolve this, try simplifying the **web.config** file on your Windows server. Here's a sample file configuration: On Windows servers, the **web.config** file may not be set correctly to allow for the endpoints to work correctly. In this case, clicking on endpoint links (e.g. /edit-account/ or /customer-logout/) may appear to do nothing except refresh the page. In order to resolve this, try simplifying the **web.config** file on your Windows server. Here's a sample file configuration:
```xml ```xml
<?xml version="1.0" encoding="UTF-8"?> <&lt;>?xml version="1.0" encoding="UTF-8"?&gt;
<configuration> &lt;configuration&gt;
<system.webServer> &lt;system.webServer&gt;
<handlers accessPolicy="Read, Execute, Script" /> &lt;handlers accessPolicy="Read, Execute, Script" /&gt;
<rewrite> &lt;rewrite&gt;
<rules> &lt;rules&gt;
<rule name="wordpress" patternSyntax="Wildcard"> &lt;rule name="wordpress" patternSyntax="Wildcard"&gt;
<match url="*" /> &lt;match url="*" /&gt;
<conditions> &lt;conditions&gt;
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /> &lt;add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /&gt;
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /> &lt;add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /&gt;
</conditions> &lt;/conditions&gt;
<action type="Rewrite" url="index.php" /> &lt;action type="Rewrite" url="index.php" /&gt;
</rule> &lt;/rule&gt;
</rules> &lt;/rules&gt;
</rewrite> &lt;/rewrite&gt;
</system.webServer> &lt;/system.webServer&gt;
</configuration> &lt;/configuration&gt;
``` ```
### Pages direct to wrong place ### Pages direct to wrong place
@ -74,6 +74,6 @@ Landing on the wrong page when clicking an endpoint URL is typically caused by i
### How to Remove "Downloads" from My Account ### How to Remove "Downloads" from My Account
Sometimes the "Downloads" endpoint on the "My account" page does not need to be displayed. This can be removed by going to **WooCommerce → Settings → Advanced → Account endpoints** and clearing the Downloads endpoint field. Sometimes the "Downloads" endpoint on the "My account" page does not need to be displayed. This can be removed by going to **WooCommerce > Settings > Advanced > Account endpoints** and clearing the Downloads endpoint field.
![Account endpoints](https://developer.woocommerce.com/wp-content/uploads/2023/12/Screenshot-2023-04-09-at-11.45.58-PM.png) ![Account endpoints](https://developer.woocommerce.com/wp-content/uploads/2023/12/Screenshot-2023-04-09-at-11.45.58-PM.png)

View File

@ -18,24 +18,24 @@ For more information, learn how to [Customize Endpoints](./customizing-endpoint-
On Windows servers, the **web.config** file may not be set correctly to allow for the endpoints to work correctly. In this case, clicking on endpoint links (e.g. /edit-account/ or /customer-logout/) may appear to do nothing except refresh the page. In order to resolve this, try simplifying the **web.config** file on your Windows server. Here's a sample file configuration: On Windows servers, the **web.config** file may not be set correctly to allow for the endpoints to work correctly. In this case, clicking on endpoint links (e.g. /edit-account/ or /customer-logout/) may appear to do nothing except refresh the page. In order to resolve this, try simplifying the **web.config** file on your Windows server. Here's a sample file configuration:
```xml ```xml
<?xml version="1.0" encoding="UTF-8"?> &lt;?xml version="1.0" encoding="UTF-8"?&gt;
<configuration> &lt;configuration&gt;
<system.webServer> &lt;system.webServer&gt;
<handlers accessPolicy="Read, Execute, Script" /> &lt;handlers accessPolicy="Read, Execute, Script" /&gt;
<rewrite> &lt;rewrite&gt;
<rules> &lt;rules&gt;
<rule name="wordpress" patternSyntax="Wildcard"> &lt;rule name="wordpress" patternSyntax="Wildcard"&gt;
<match url="*" /> &lt;match url="*" /&gt;
<conditions> &lt;conditions&gt;
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /> &lt;add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /&gt;
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /> &lt;add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /&gt;
</conditions> &lt;/conditions&gt;
<action type="Rewrite" url="index.php" /> &lt;action type="Rewrite" url="index.php" /&gt;
</rule> &lt;/rule&gt;
</rules> &lt;/rules&gt;
</rewrite> &lt;/rewrite&gt;
</system.webServer> &lt;/system.webServer&gt;
</configuration> &lt;/configuration&gt;
``` ```
## Pages direct to wrong place ## Pages direct to wrong place
@ -44,6 +44,6 @@ Landing on the wrong page when clicking an endpoint URL is typically caused by i
## How to Remove "Downloads" from My Account ## How to Remove "Downloads" from My Account
Sometimes the "Downloads" endpoint on the "My account" page does not need to be displayed. This can be removed by going to **WooCommerce → Settings → Advanced → Account endpoints** and clearing the Downloads endpoint field. Sometimes the "Downloads" endpoint on the "My account" page does not need to be displayed. This can be removed by going to **WooCommerce > Settings > Advanced > Account endpoints** and clearing the Downloads endpoint field.
![Account endpoints](https://developer.woocommerce.com/wp-content/uploads/2023/12/Screenshot-2023-04-09-at-11.45.58-PM.png) ![Account endpoints](https://developer.woocommerce.com/wp-content/uploads/2023/12/Screenshot-2023-04-09-at-11.45.58-PM.png)

View File

@ -229,7 +229,7 @@ The backfill command can be used to selectively migrate order data (or whole ord
The exact syntax for this command is as follows: The exact syntax for this command is as follows:
```plaintext ```plaintext
wp wc hpos backfill <order_id> --from=<datastore> --to=<datastore> [--meta_keys=<meta_keys>] [--props=<props>] wp wc hpos backfill &lt;order_id&gt; --from=&lt;datastore&gt; --to=&lt;datastore&gt; [--meta_keys=&lt;meta_keys&gt;] [--props=&lt;props&gt;]
``` ```
You have to specify which datastore to use as source (either `posts` or `hpos`) and which one to use as destination. The `--meta_keys` and `--props` arguments receive a comma separated list of meta keys and order properties, which can be used to move only certain data from one datastore to the other, instead of the whole order. You have to specify which datastore to use as source (either `posts` or `hpos`) and which one to use as destination. The `--meta_keys` and `--props` arguments receive a comma separated list of meta keys and order properties, which can be used to move only certain data from one datastore to the other, instead of the whole order.

View File

@ -36,7 +36,7 @@ We will explain important arguments that can be passed to `__experimentalRegiste
A Collection is defined by an object that can contain the following fields: A Collection is defined by an object that can contain the following fields:
- `name` (type `string`): A unique and machine-readable collection name. We recommend using the format `<plugin-name>/product-collection/<collection-name>`. Both `<plugin-name>` and `<collection-name>` should consist only of alphanumeric characters and hyphens (e.g., `my-plugin/product-collection/my-collection`). - `name` (type `string`): A unique and machine-readable collection name. We recommend using the format `&lt;plugin-name&gt;/product-collection/&lt;collection-name&gt;`. Both `&lt;plugin-name&gt;` and `&lt;collection-name&gt;` should consist only of alphanumeric characters and hyphens (e.g., `my-plugin/product-collection/my-collection`).
- `title` (type `string`): The title of the collection, which will be displayed in various places including the block inserter and collection chooser. - `title` (type `string`): The title of the collection, which will be displayed in various places including the block inserter and collection chooser.
- `description` (optional, type `string`): A human-readable description of the collection. - `description` (optional, type `string`): A human-readable description of the collection.
- `innerBlocks` (optional, type `Array[]`): An array of inner blocks that will be added to the collection. If not provided, the default inner blocks will be used. - `innerBlocks` (optional, type `Array[]`): An array of inner blocks that will be added to the collection. If not provided, the default inner blocks will be used.

View File

@ -62,7 +62,7 @@ In React:
import { registerBlockType } from '@wordpress/blocks'; import { registerBlockType } from '@wordpress/blocks';
function Edit() { function Edit() {
return <p>Hello World (from the editor).</p>; return &lt;p&gt;Hello World (from the editor).&lt;/p&gt;;
} }
registerBlockType( 'tutorial/new-product-form-field', { registerBlockType( 'tutorial/new-product-form-field', {
@ -217,8 +217,8 @@ function Edit( { attributes } ) {
const blockProps = useWooBlockProps( attributes ); const blockProps = useWooBlockProps( attributes );
return ( return (
<div { ...blockProps }> &lt;div { ...blockProps }&gt;
<ComboboxControl &lt;ComboboxControl
label="Example dropdown" label="Example dropdown"
value={ value } value={ value }
onChange={ setValue } onChange={ setValue }
@ -232,8 +232,8 @@ function Edit( { attributes } ) {
) )
) )
} }
/> /&gt;
</div> &lt;/div&gt;
); );
} }
``` ```

View File

@ -32,7 +32,7 @@ npm run create-wc-extension
After choosing a name, move into that folder and start webpack to watch and build files. After choosing a name, move into that folder and start webpack to watch and build files.
```sh ```sh
cd ../<my-plugin-name> cd ../&lt;my-plugin-name&gt;
npm install npm install
npm start npm start
``` ```

View File

@ -73,11 +73,11 @@ add_action('woocommerce_before_main_content', 'my_theme_wrapper_start', 10);
add_action('woocommerce_after_main_content', 'my_theme_wrapper_end', 10); add_action('woocommerce_after_main_content', 'my_theme_wrapper_end', 10);
function my_theme_wrapper_start() { function my_theme_wrapper_start() {
echo '<section id="main">'; echo '&lt;section id="main"&gt;';
} }
function my_theme_wrapper_end() { function my_theme_wrapper_end() {
echo '</section>'; echo '&lt;/section&gt;';
} }
``` ```

View File

@ -117,7 +117,7 @@ Options: table, json, csv, ids, yaml, count, headers, body, envelope
### wc customer_download ### wc customer_download
#### wc customer_download list <customer_id> #### wc customer_download list &lt;customer_id&gt;
- `--customer_id` - Unique identifier for the resource. - `--customer_id` - Unique identifier for the resource.
- `--context` - Scope under which the request is made; determines fields present in response. - `--context` - Scope under which the request is made; determines fields present in response.
@ -198,7 +198,7 @@ Options: table, json, csv, ids, yaml, count, headers, body, envelope
### wc order_note ### wc order_note
#### wc order_note list <order_id> #### wc order_note list &lt;order_id&gt;
- `--order_id` - The order ID. - `--order_id` - The order ID.
- `--context` - Scope under which the request is made; determines fields present in response. - `--context` - Scope under which the request is made; determines fields present in response.
@ -211,14 +211,14 @@ Default: table
Options: table, json, csv, ids, yaml, count, headers, body, envelope Options: table, json, csv, ids, yaml, count, headers, body, envelope
#### wc order_note create <order_id> #### wc order_note create &lt;order_id&gt;
- `--order_id` - The order ID. - `--order_id` - The order ID.
- `--note` - Order note content. (*Required*) - `--note` - Order note content. (*Required*)
- `--customer_note` - If true, the note will be shown to customers and they will be notified. If false, the note will be for admin reference only. - `--customer_note` - If true, the note will be shown to customers and they will be notified. If false, the note will be for admin reference only.
- `--porcelain` - Output just the id when the operation is successful. - `--porcelain` - Output just the id when the operation is successful.
#### wc order_note get <order_id> [id] #### wc order_note get &lt;order_id&gt; [id]
- `--id` - Unique identifier for the resource. - `--id` - Unique identifier for the resource.
- `--order_id` - The order ID. - `--order_id` - The order ID.
@ -231,7 +231,7 @@ Default: table
Options: table, json, csv, ids, yaml, count, headers, body, envelope Options: table, json, csv, ids, yaml, count, headers, body, envelope
#### wc order_note delete <order_id> [id] #### wc order_note delete &lt;order_id&gt; [id]
- `--id` - Unique identifier for the resource. - `--id` - Unique identifier for the resource.
- `--order_id` - The order ID. - `--order_id` - The order ID.
@ -240,7 +240,7 @@ Options: table, json, csv, ids, yaml, count, headers, body, envelope
### wc shop_order_refund ### wc shop_order_refund
#### wc shop_order_refund list <order_id> #### wc shop_order_refund list &lt;order_id&gt;
- `--order_id` - The order ID. - `--order_id` - The order ID.
- `--context` - Scope under which the request is made; determines fields present in response. - `--context` - Scope under which the request is made; determines fields present in response.
@ -265,7 +265,7 @@ Default: table
Options: table, json, csv, ids, yaml, count, headers, body, envelope Options: table, json, csv, ids, yaml, count, headers, body, envelope
#### wc shop_order_refund create <order_id> #### wc shop_order_refund create &lt;order_id&gt;
- `--order_id` - The order ID. - `--order_id` - The order ID.
- `--amount` - Refund amount. - `--amount` - Refund amount.
@ -276,7 +276,7 @@ Options: table, json, csv, ids, yaml, count, headers, body, envelope
- `--api_refund` - When true, the payment gateway API is used to generate the refund. - `--api_refund` - When true, the payment gateway API is used to generate the refund.
- `--porcelain` - Output just the id when the operation is successful. - `--porcelain` - Output just the id when the operation is successful.
#### wc shop_order_refund get <order_id> [id] #### wc shop_order_refund get &lt;order_id&gt; [id]
- `--order_id` - The order ID. - `--order_id` - The order ID.
- `--id` - Unique identifier for the resource. - `--id` - Unique identifier for the resource.
@ -289,7 +289,7 @@ Default: table
Options: table, json, csv, ids, yaml, count, headers, body, envelope Options: table, json, csv, ids, yaml, count, headers, body, envelope
#### wc shop_order_refund delete <order_id> [id] #### wc shop_order_refund delete &lt;order_id&gt; [id]
- `--order_id` - The order ID. - `--order_id` - The order ID.
- `--id` - Unique identifier for the resource. - `--id` - Unique identifier for the resource.
@ -386,7 +386,7 @@ Options: table, json, csv, ids, yaml, count, headers, body, envelope
### wc product_attribute_term ### wc product_attribute_term
#### wc product_attribute_term list <attribute_id> #### wc product_attribute_term list &lt;attribute_id&gt;
- `--attribute_id` - Unique identifier for the attribute of the terms. - `--attribute_id` - Unique identifier for the attribute of the terms.
- `--context` - Scope under which the request is made; determines fields present in response. - `--context` - Scope under which the request is made; determines fields present in response.
@ -409,7 +409,7 @@ Default: table
Options: table, json, csv, ids, yaml, count, headers, body, envelope Options: table, json, csv, ids, yaml, count, headers, body, envelope
#### wc product_attribute_term create <attribute_id> #### wc product_attribute_term create &lt;attribute_id&gt;
- `--attribute_id` - Unique identifier for the attribute of the terms. - `--attribute_id` - Unique identifier for the attribute of the terms.
- `--name` - Name for the resource. (*Required*) - `--name` - Name for the resource. (*Required*)
@ -418,7 +418,7 @@ Options: table, json, csv, ids, yaml, count, headers, body, envelope
- `--menu_order` - Menu order, used to custom sort the resource. - `--menu_order` - Menu order, used to custom sort the resource.
- `--porcelain` - Output just the id when the operation is successful. - `--porcelain` - Output just the id when the operation is successful.
#### wc product_attribute_term get <attribute_id> [id] #### wc product_attribute_term get &lt;attribute_id&gt; [id]
- `--id` - Unique identifier for the resource. - `--id` - Unique identifier for the resource.
- `--attribute_id` - Unique identifier for the attribute of the terms. - `--attribute_id` - Unique identifier for the attribute of the terms.
@ -431,7 +431,7 @@ Default: table
Options: table, json, csv, ids, yaml, count, headers, body, envelope Options: table, json, csv, ids, yaml, count, headers, body, envelope
#### wc product_attribute_term update <attribute_id> [id] #### wc product_attribute_term update &lt;attribute_id&gt; [id]
- `--id` - Unique identifier for the resource. - `--id` - Unique identifier for the resource.
- `--attribute_id` - Unique identifier for the attribute of the terms. - `--attribute_id` - Unique identifier for the attribute of the terms.
@ -441,7 +441,7 @@ Options: table, json, csv, ids, yaml, count, headers, body, envelope
- `--menu_order` - Menu order, used to custom sort the resource. - `--menu_order` - Menu order, used to custom sort the resource.
- `--porcelain` - Output just the id when the operation is successful. - `--porcelain` - Output just the id when the operation is successful.
#### wc product_attribute_term delete <attribute_id> [id] #### wc product_attribute_term delete &lt;attribute_id&gt; [id]
- `--id` - Unique identifier for the resource. - `--id` - Unique identifier for the resource.
- `--attribute_id` - Unique identifier for the attribute of the terms. - `--attribute_id` - Unique identifier for the attribute of the terms.
@ -565,7 +565,7 @@ Options: table, json, csv, ids, yaml, count, headers, body, envelope
### wc product_review ### wc product_review
#### wc product_review list <product_id> #### wc product_review list &lt;product_id&gt;
- `--product_id` - Unique identifier for the variable product. - `--product_id` - Unique identifier for the variable product.
- `--id` - Unique identifier for the variation. - `--id` - Unique identifier for the variation.
@ -578,7 +578,7 @@ Default: table
Options: table, json, csv, ids, yaml, count, headers, body, envelope Options: table, json, csv, ids, yaml, count, headers, body, envelope
#### wc product_review create <product_id> #### wc product_review create &lt;product_id&gt;
- `--product_id` - Unique identifier for the variable product. - `--product_id` - Unique identifier for the variable product.
- `--id` - Unique identifier for the variation. - `--id` - Unique identifier for the variation.
@ -590,7 +590,7 @@ Options: table, json, csv, ids, yaml, count, headers, body, envelope
- `--email` - Email of the reviewer. (*Required*) - `--email` - Email of the reviewer. (*Required*)
- `--porcelain` - Output just the id when the operation is successful. - `--porcelain` - Output just the id when the operation is successful.
#### wc product_review get <product_id> [id] #### wc product_review get &lt;product_id&gt; [id]
- `--product_id` - Unique identifier for the variable product. - `--product_id` - Unique identifier for the variable product.
- `--id` - Unique identifier for the resource. - `--id` - Unique identifier for the resource.
@ -603,7 +603,7 @@ Default: table
Options: table, json, csv, ids, yaml, count, headers, body, envelope Options: table, json, csv, ids, yaml, count, headers, body, envelope
#### wc product_review update <product_id> [id] #### wc product_review update &lt;product_id&gt; [id]
- `--product_id` - Unique identifier for the variable product. - `--product_id` - Unique identifier for the variable product.
- `--id` - Unique identifier for the resource. - `--id` - Unique identifier for the resource.
@ -615,7 +615,7 @@ Options: table, json, csv, ids, yaml, count, headers, body, envelope
- `--email` - Reviewer email. - `--email` - Reviewer email.
- `--porcelain` - Output just the id when the operation is successful. - `--porcelain` - Output just the id when the operation is successful.
#### wc product_review delete <product_id> [id] #### wc product_review delete &lt;product_id&gt; [id]
- `--product_id` - Unique identifier for the variable product. - `--product_id` - Unique identifier for the variable product.
- `--id` - Unique identifier for the resource. - `--id` - Unique identifier for the resource.
@ -893,7 +893,7 @@ Options: table, json, csv, ids, yaml, count, headers, body, envelope
### wc product_variation ### wc product_variation
#### wc product_variation list <product_id> #### wc product_variation list &lt;product_id&gt;
- `--product_id` - Unique identifier for the variable product. - `--product_id` - Unique identifier for the variable product.
- `--context` - Scope under which the request is made; determines fields present in response. - `--context` - Scope under which the request is made; determines fields present in response.
@ -932,7 +932,7 @@ Default: table
Options: table, json, csv, ids, yaml, count, headers, body, envelope Options: table, json, csv, ids, yaml, count, headers, body, envelope
#### wc product_variation create <product_id> #### wc product_variation create &lt;product_id&gt;
- `--product_id` - Unique identifier for the variable product. - `--product_id` - Unique identifier for the variable product.
- `--description` - Variation description. - `--description` - Variation description.
@ -964,7 +964,7 @@ Options: table, json, csv, ids, yaml, count, headers, body, envelope
- `--meta_data` - Meta data. - `--meta_data` - Meta data.
- `--porcelain` - Output just the id when the operation is successful. - `--porcelain` - Output just the id when the operation is successful.
#### wc product_variation get <product_id> [id] #### wc product_variation get &lt;product_id&gt; [id]
- `--product_id` - Unique identifier for the variable product. - `--product_id` - Unique identifier for the variable product.
- `--id` - Unique identifier for the variation. - `--id` - Unique identifier for the variation.
@ -977,7 +977,7 @@ Default: table
Options: table, json, csv, ids, yaml, count, headers, body, envelope Options: table, json, csv, ids, yaml, count, headers, body, envelope
#### wc product_variation update <product_id> [id] #### wc product_variation update &lt;product_id&gt; [id]
- `--product_id` - Unique identifier for the variable product. - `--product_id` - Unique identifier for the variable product.
- `--id` - Unique identifier for the variation. - `--id` - Unique identifier for the variation.
@ -1010,7 +1010,7 @@ Options: table, json, csv, ids, yaml, count, headers, body, envelope
- `--meta_data` - Meta data. - `--meta_data` - Meta data.
- `--porcelain` - Output just the id when the operation is successful. - `--porcelain` - Output just the id when the operation is successful.
#### wc product_variation delete <product_id> [id] #### wc product_variation delete &lt;product_id&gt; [id]
- `--product_id` - Unique identifier for the variable product. - `--product_id` - Unique identifier for the variable product.
- `--id` - Unique identifier for the variation. - `--id` - Unique identifier for the variation.