I hereby claim:
- I am coderkevin on github.
- I am coderkevin (https://keybase.io/coderkevin) on keybase.
- I have a public key whose fingerprint is DCD0 CB4F 5EF6 EA0E 0385 AA7D A74D CDB4 3AFB 05CA
To claim this, I am signing this object:
docker build --build-arg commit_sha=2ab204a4c9bd056faece7d4563cb7d78adc77a36 -t wp-calypso . | |
Sending build context to Docker daemon 41.74MB | |
Step 1/16 : FROM node:8.9.3 | |
---> 2eeae8debf3d | |
Step 2/16 : LABEL maintainer "Automattic" | |
---> Using cache | |
---> 1161577eed41 | |
Step 3/16 : WORKDIR /calypso | |
---> Using cache | |
---> fe93c697529e |
public function read( &$product ) { | |
$this->parent_instance->read( $product ); | |
$inventory_url = 'http://localhost:8080/api/inventory/' . $product->get_sku(); | |
$request = wp_remote_get( $inventory_url ); | |
$response = wp_remote_retrieve_body( $request ); | |
$data = json_decode( $response ); | |
$product->set_stock_quantity( $data ); | |
} |
public function update( &$product ) { | |
$this->parent_instance->update( $product ); | |
} |
class WC_Product_Inventory_Data_Store | |
implements WC_Object_Data_Store_Interface, WC_Product_Data_Store_Interface { | |
public function __construct( &$parent_data_store ) { | |
$this->parent_instance = $this->create_parent_instance( $parent_data_store ); | |
} |
class WC_Product_Inventory_Data_Store_Plugin { | |
public function __construct() { | |
add_filter( 'woocommerce_data_stores', array( $this, 'install_data_store' ) ); | |
} | |
public function install_data_store( $stores ) { | |
include_once dirname( __FILE__ ) . '/class-product-inventory-data-store.php'; | |
$instance = new WC_Product_Inventory_Data_Store( $stores[ 'product' ] ); |
I hereby claim:
To claim this, I am signing this object:
// TODO: Find another way to do the extra actions. | |
// The extra actions on this return complicate things, mostly because | |
// it moves the chain of logic away from the state, and toward chaining | |
// actions instead. What if it's possible to get in the same state another | |
// way? Then we have to add that state to the other actions too. | |
// Also, this way, extra parameters have to added to this function | |
// just to pass them through to the resulting actions, which is coupling | |
// these things too tightly. | |
export function requestProfile( networkName, siteUrl, clientKey ) { | |
return bindRequest( |