This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$component_orderby_options = apply_filters( 'woocommerce_composite_component_orderby', array( | |
'default' => __( 'Default sorting', 'woocommerce' ), | |
'popularity' => __( 'Sort by popularity', 'woocommerce' ), | |
'date' => __( 'Sort by newness', 'woocommerce' ), | |
'price' => __( 'Sort by price: low to high', 'woocommerce' ), | |
'price-desc' => __( 'Sort by price: high to low', 'woocommerce' ) | |
), $component_id, $this ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"1425027293": { | |
"title": "Deck", | |
"selection_title": "Chocolate Marc Johnson Subtle Square", | |
"selection_meta": [], | |
"product_id": "100", | |
"variation_id": "", | |
"product_valid": true, | |
"variation_valid": true, | |
"quantity": 1, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;( function ( $, window, document, undefined ) { | |
$( '.composite_data' ) | |
.on( 'wc-composite-initializing', function( event, composite ) { | |
// Add your code here. | |
} ); | |
} ) ( jQuery, window, document ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -X PUT https://example.com/wp-json/wc/v2/products/133 \ | |
-u consumer_key:consumer_secret \ | |
-H "Content-Type: application/json" \ | |
-d '{ | |
"composite_components": [ | |
{ | |
"title": "Your Free Poster", | |
"description": "Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo.", | |
"query_type": "product_ids", | |
"query_ids": [ 70 ], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -X PUT https://example.com/wp-json/wc/v2/orders/199 \ | |
-u consumer_key:consumer_secret \ | |
-H "Content-Type: application/json" \ | |
-k \ | |
-d '{ | |
"line_items": [ | |
{ | |
"product_id": 101, | |
"quantity": 1, | |
"composite_configuration": [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -X POST https://example.com/wp-json/wc/v2/products \ | |
-u consumer_key:consumer_secret \ | |
-H "Content-Type: application/json" \ | |
-d '{ | |
"name": "Build Your Ninja Outfit", | |
"type": "composite", | |
"description": "In pretium enim justo, at ornare libero aliquam quis. Nullam imperdiet rutrum volutpat. Suspendisse aliquet ex in ex volutpat vestibulum. Curabitur ultrices convallis condimentum.", | |
"short_description": "In pretium enim justo, at ornare libero aliquam quis.", | |
"categories": [ | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -X PUT https://example.com/wp-json/wc/v2/products/133 \ | |
-u consumer_key:consumer_secret \ | |
-H "Content-Type: application/json" \ | |
-d '{ | |
"composite_components": [ | |
{ | |
"id": "123456789", | |
"delete": true | |
} | |
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -X PUT https://example.com/wp-json/wc/v2/products/133 \ | |
-u consumer_key:consumer_secret \ | |
-H "Content-Type: application/json" \ | |
-d '{ | |
"composite_components": [ | |
{ | |
"id": "123456789", | |
"title": "Your Poster Offer", | |
"optional": true, | |
"discount": "50.0", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -X POST https://example.com/wp-json/wc/v1/products \ | |
-u consumer_key:consumer_secret \ | |
-H "Content-Type: application/json" \ | |
-d '{ | |
"name": "Happy Ninja Bundle", | |
"type": "bundle", | |
"regular_price": "53.0", | |
"sale_price": "37.0", | |
"description": "In pretium enim justo, at ornare libero aliquam quis. Nullam imperdiet rutrum volutpat. Suspendisse aliquet ex in ex volutpat vestibulum. Curabitur ultrices convallis condimentum.", | |
"short_description": "In pretium enim justo, at ornare libero aliquam quis.", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -X PUT https://example.com/wp-json/wc/v1/products/133 \ | |
-u consumer_key:consumer_secret \ | |
-H "Content-Type: application/json" \ | |
-d '{ | |
"bundled_items": [ | |
{ | |
"product_id": 70, | |
"quantity_min": 1, | |
"quantity_max": 1, |
OlderNewer