Skip to content

Commit 4021187

Browse files
committed
Issue #22 quick fix.
1 parent a317745 commit 4021187

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

readme.txt

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ Contributors: judgej
33
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.4.2
7-
Stable tag: 0.7.0
6+
Tested up to: 4.7.5
7+
Stable tag: 0.7.1
88
License: GPL2
99
License URI: http://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html
1010

@@ -24,3 +24,8 @@ Standard installation - whatever you normally do.
2424
Will only work with WooCommerce with the V2 API at his time, which means any version
2525
from mid-2015, until the V2 API is eventually removed. It may work with the V3
2626
API, but that has not been tested.
27+
28+
== Changelog ==
29+
30+
= 0.7.1 =
31+
* Fix for issue https://github.com/judgej/wc-api-custom-meta/issues/22

wc-api-custom-meta.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
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.7.0
6+
Version: 0.7.1
77
Author: Jason Judge
88
Author URI: http://academe.co.uk https://github.com/buxit
99
*/
@@ -106,7 +106,7 @@ public static function fetchCustomMeta($product_data, $product, $fields, $server
106106
// We only want users with this capability to see additional product meta fields.
107107

108108
if (current_user_can('manage_woocommerce')) {
109-
$product_id = $product->id;
109+
$product_id = $product->get_id();
110110

111111
$all_meta = get_post_meta($product_id);
112112

0 commit comments

Comments
 (0)