Skip to content

Instantly share code, notes, and snippets.

WooGists woogists

Block or report user

Report or block woogists

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
woogists / functions.php
Last active Jul 25, 2019
[WooCommerce Bookings]: Set custom Google client ID and secret
View functions.php
* Update Google client with your own application's cliend ID and secret from the Google Developer's Console.
function ( Google_Client $client ) {
$client->setClientId( 'YourClientIDFromGoogleDevelopersConsole' );
$client->setClientSecret( 'YourClientIDFromGoogleDevelopersConsole' );
woogists / gist:482a79494f6def6b127326af5057b0d6
Created Mar 26, 2019 — forked from woogist/gist:0eb9bb4bdb373b4894a8
Shipment Tracking: adds custom provider
View gist:482a79494f6def6b127326af5057b0d6
add_filter( 'wc_shipment_tracking_get_providers' , 'wc_shipment_tracking_add_custom_provider' );
* wc_shipment_tracking_add_custom_provider
* Adds custom provider to shipment tracking
* Change the country name, the provider name, and the URL (it must include the %1$s)
* Add one provider per line
woogists / gist:9bd427bdf92e966d7f368355f97e17b2
Created Mar 20, 2019
Bookings REST API Bookings JSON Response
View gist:9bd427bdf92e966d7f368355f97e17b2
"all_day": true,
"cost": "100",
"customer_id": 1,
"date_created": 1551471271,
"date_modified": 1551593795,
"end": 1551571199,
"google_calendar_event_id": "uhd8bir3raajo4tco365foii1o",
"order_id": 154167,
woogists / gist:04acb250c38f042911a97a46bd3815db
Last active Mar 20, 2019
Bookings REST API Products JSON Response
View gist:04acb250c38f042911a97a46bd3815db
"id": 171578,
"name": "Candy Land",
"slug": "candy-land",
"permalink": "https://yoursite.test/product/candy-land/",
"date_created": "2019-03-19T10:54:48",
"date_created_gmt": "2019-03-19T17:54:48",
"date_modified": "2019-03-19T15:37:38",
"date_modified_gmt": "2019-03-19T22:37:38",
woogists / gist:75b8b462855fe8c981d543b028815bd7
Created Mar 19, 2019
Bookings REST API Resources JSON Response
View gist:75b8b462855fe8c981d543b028815bd7
"id": 145546,
"availability": [],
"base_cost": 0,
"block_cost": 0,
"name": "The Vault",
"parent_id": 0,
"qty": "5",
"sort_order": 0,
woogists / gist:cb71b7208cd870a08e6beba773b42988
Last active Mar 19, 2019
Bookings REST API Categories JSON Response
View gist:cb71b7208cd870a08e6beba773b42988
"id": 484,
"name": "Accessories",
"slug": "accessories",
"parent": 0,
"description": "",
"display": "default",
"image": null,
"menu_order": 0,
woogists / gist:bd4065d14cb74bb76db7fdbdbdcc77c9
Last active Mar 19, 2019
Bookings REST API Slots JSON Response
View gist:bd4065d14cb74bb76db7fdbdbdcc77c9
"records": [
"date": "2019-03-19T00:00:00-0700",
"duration": 1,
"duration_unit": "day",
"booked": 0,
"available": 1,
"resources": {
"0": 1
woogists / storefront-logo-size-adjust-example.css
Created Oct 26, 2018
Adjust the dimensions of the header logo in the Storefront theme.
View storefront-logo-size-adjust-example.css
@media screen and (min-width: 768px) {
.woocommerce-active .site-header .site-branding img {
max-width: 40%; /* Adjust this percentage up or down to make the logo larger or smaller. */
woogists / hide-trailing-zeros-on-prices.php
Last active Mar 14, 2019
[General Snippets][Hide trailing zeros on prices]
View hide-trailing-zeros-on-prices.php
* Trim zeros in price decimals
add_filter( 'woocommerce_price_trim_zeros', '__return_true' );


The Brands REST API allows you to create, view, update, and delete individual, or a batch, of brands. The endpoint is /wp-json/wc/v1/products/brands which basically mimics /wp-json/wc/v1/products/categories. You can refer to the same documentation of product categories REST API.

In addition to /products/brands endpoints, the /products endpoints also updated to display brands in the response and check the JSON request for brands.


  • Retrieve all product brands:
You can’t perform that action at this time.