Skip to content

Instantly share code, notes, and snippets.

View gedex's full-sized avatar
🏠
Working from home

Akeda Bagus gedex

🏠
Working from home
View GitHub Profile
@gedex
gedex / woocommerce-brands-rest-api-doc.md
Last active June 9, 2018 13:13
Brands REST API in 1.5.0

Brands REST API

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.

Examples

  • Retrieve all product brands:
@gedex
gedex / woocommerce-shipment-tracking-rest-api-doc.md
Last active March 21, 2020 09:05
WooCommerce Shipment Tracking REST API introduced in 1.5.0

Shipment Tracking REST API

The shipment tracking REST API allows you to create, view, and delete individual shipment tracking. The endpoint is /wp-json/wc/v1/orders/shipment-trackings.

Shipment Tracking Properties

Attribute Type Description
tracking_id string Unique identifier for shipment tracking read-only
tracking_number string Tracking number required
<?php
if ( ! defined( 'WP_CLI' ) ) {
return;
}
if ( ! WP_CLI ) {
return;
}
<?php
if ( ! defined( 'WP_CLI' ) ) {
return;
}
if ( ! WP_CLI ) {
return;
}
@gedex
gedex / woocommerce-woocommerce-gateway-amazon-payments-advanced-rest-api-doc.md
Last active October 30, 2018 15:59
WooCommerce Gateway Amazon Payments Advanced REST API introduced in 1.6.0

WooCommerce Gateway Amazon Payments Advanced REST API

The WooCommerce Gateway Amazon Payments Advanced REST API allows you to authorize, capture, and close authorization. The endpoint is /wp-json/wc/v1/orders/<order_id>/amazon-payments-advanced/.

List of orders paid via Amazon Payments

There's no custom endpoint to retrieve list of orders paid via Amazon Payments. The built-in orders point can be used with _payment_method=amazon_payments_advanced filter.

diff --git a/gp-includes/things/translation.php b/gp-includes/things/translation.php
index 5beed6a..e90a9b6 100644
--- a/gp-includes/things/translation.php
+++ b/gp-includes/things/translation.php
@@ -491,8 +491,14 @@ class GP_Translation extends GP_Thing {
} else {
$updated = $this->save( array( 'user_id_last_modified' => get_current_user_id(), 'status' => $status ) );
}
+ $old_status = $this->status;
+
#!/usr/bin/env bash
# Store current directory.
CUR_DIR=$(pwd)
default_old_gh_org="woothemes"
default_new_gh_org="woocommerce"
default_plugins_dir="$CUR_DIR"
echo "Your WP_PLUGIN_DIR. No trailing slash."
#!/usr/bin/env bash
# Store current directory.
CUR_DIR=$(pwd)
default_old_gh_org="woothemes"
default_new_gh_org="woocommerce"
default_plugins_dir="$CUR_DIR"
echo "Your WP_PLUGIN_DIR. No trailing slash."
#!/usr/bin/env bash
set -e
CUR_DIR=$(pwd)
PRE_COMMIT_URL="https://gist.githubusercontent.com/gedex/f7441bb14fbb04058c24014d8d8db8c9/raw/5aadc9e6e42c8ddc1f79bfc57e15ef2b5f75b604/pre-commit"
PRE_COMMIT="/tmp/the-extendables-pre-commit"
echo "Your WP_PLUGIN_Dir. No trailing slash."
printf "($CUR_DIR): "
+-------------------------------------------------+-----------+--------------------------------------------------+------------+-------+
| EXTENSION | MISMATCH? | MSG | HAS LABEL? | ISSUE |
+-------------------------------------------------+-----------+--------------------------------------------------+------------+-------+
| woocommerce-warranty | Yes | * Plugin's Text Domain doesn't | No | |
| | | match with repo's slug. | | |
| | | Expecting woocommerce-warranty | | |
| | | in Text Domain. | | |
| woocommerce-xero | Yes | * Plugin