Skip to content

Commit a317745

Browse files
committed
Update the versions and documenation.
1 parent 6717e88 commit a317745

File tree

3 files changed

+43
-6
lines changed

3 files changed

+43
-6
lines changed

README.md

+30
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,36 @@ $product = [
3939
That's it. Make sure those elements are in your REST API request, and this plugin is installed at the other end,
4040
and you can set any meta fields you like, except for the protected fields (see below).
4141

42+
From version 0.7.0 metadata on variations is also supported:
43+
44+
~~~php
45+
$product = [
46+
'product' => [
47+
'title' => 'Foobar',
48+
...
49+
'variations' => [
50+
[
51+
'regular_price' => '9.50',
52+
'attributes' => [
53+
[
54+
'name' => 'Pack Size',
55+
'slug' => 'pack-size',
56+
'option' => '4-pack etc',
57+
],
58+
// These custom meta fields will be added to the variations.
59+
// When fetching variable products, the metafields will be retrieved
60+
// for the variations.
61+
'custom_meta' => [
62+
'my_custom_variation_field_name' => 'my custom variation value',
63+
'my_other_variation_custom_field_name' => 'my other custom variation value',
64+
],
65+
],
66+
],
67+
],
68+
]
69+
]
70+
~~~
71+
4272
I have not tested this with anything other than strings, so be aware that the behaviour storing other data structures
4373
in metafields are *undefined* at present.
4474

readme.txt

+11-4
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,26 @@
11
=== WC API Custom Meta ===
22
Contributors: judgej
3-
Tags: woocommerce,
3+
Tags: woocommerce, api
44
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=B4STZL8F5WHK6
55
Requires at least: 4.0.0
6-
Tested up to: 4.2.2
7-
Stable tag: 0.6.0
6+
Tested up to: 4.4.2
7+
Stable tag: 0.7.0
88
License: GPL2
99
License URI: http://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html
1010

1111
Allows access to custom meta fields on products through the API.
1212

1313
== Description ==
1414
Allows access to custom meta fields on products through the API.
15+
In short, installing this plugin on your WooCommerce site, will extend the
16+
WooCommerce API so that custom metadata can be passed back and forth through
17+
that API.
18+
19+
See the main documentation here: https://github.com/judgej/wc-api-custom-meta
1520

1621
== Installation ==
1722
Standard installation - whatever you normally do.
1823

19-
Will only work with WooCommerce with the V2 API.
24+
Will only work with WooCommerce with the V2 API at his time, which means any version
25+
from mid-2015, until the V2 API is eventually removed. It may work with the V3
26+
API, but that has not been tested.

wc-api-custom-meta.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
Plugin Name: WC API Custom Meta
44
Plugin URI: hhttps://github.com/judgej/wc-api-custom-meta
55
Description: Allows access to custom meta fields on products through the API.
6-
Version: 0.6.0
6+
Version: 0.7.0
77
Author: Jason Judge
8-
Author URI: http://academe.co.uk
8+
Author URI: http://academe.co.uk https://github.com/buxit
99
*/
1010

1111
/**

0 commit comments

Comments
 (0)