Skip to content

Commit 3388308

Browse files
author
Ricky Martinez
committed
Fixed product custom fields methods to use the correct v2 endpoint
1 parent a5950ee commit 3388308

1 file changed

Lines changed: 11 additions & 11 deletions

File tree

src/Bigcommerce/Api/Client.php

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,7 @@ public static function getProductImages($id)
495495
*/
496496
public static function getProductCustomFields($id)
497497
{
498-
return self::getCollection('/products/' . $id . '/customfields', 'ProductCustomField');
498+
return self::getCollection('/products/' . $id . '/custom_fields', 'ProductCustomField');
499499
}
500500

501501
/**
@@ -506,7 +506,7 @@ public static function getProductCustomFields($id)
506506
*/
507507
public static function getProductCustomField($product_id, $id)
508508
{
509-
return self::getResource('/products/' . $product_id . '/customfields/' . $id, 'ProductCustomField');
509+
return self::getResource('/products/' . $product_id . '/custom_fields/' . $id, 'ProductCustomField');
510510
}
511511

512512
/**
@@ -518,7 +518,7 @@ public static function getProductCustomField($product_id, $id)
518518
*/
519519
public static function createProductCustomField($product_id, $object)
520520
{
521-
return self::createResource('/products/' . $product_id . '/customfields', $object);
521+
return self::createResource('/products/' . $product_id . '/custom_fields', $object);
522522
}
523523

524524
/**
@@ -542,7 +542,7 @@ public static function getProductReviews($id)
542542
*/
543543
public static function updateProductCustomField($product_id, $id, $object)
544544
{
545-
return self::updateResource('/products/' . $product_id . '/customfields/' . $id, $object);
545+
return self::updateResource('/products/' . $product_id . '/custom_fields/' . $id, $object);
546546
}
547547

548548
/**
@@ -554,7 +554,7 @@ public static function updateProductCustomField($product_id, $id, $object)
554554
*/
555555
public static function deleteProductCustomField($product_id, $id)
556556
{
557-
return self::deleteResource('/products/' . $product_id . '/customfields/' . $id);
557+
return self::deleteResource('/products/' . $product_id . '/custom_fields/' . $id);
558558
}
559559

560560
/**
@@ -1916,7 +1916,7 @@ public static function updateOptionValue($optionId, $optionValueId, $object)
19161916
$object
19171917
);
19181918
}
1919-
1919+
19201920
/**
19211921
* Returns all webhooks.
19221922
*
@@ -1926,7 +1926,7 @@ public static function listWebhooks()
19261926
{
19271927
return self::getCollection('/hooks');
19281928
}
1929-
1929+
19301930
/**
19311931
* Returns data for a specific web-hook.
19321932
*
@@ -1937,7 +1937,7 @@ public static function getWebhook($id)
19371937
{
19381938
return self::getResource('/hooks/' . $id);
19391939
}
1940-
1940+
19411941
/**
19421942
* Creates a web-hook.
19431943
*
@@ -1948,7 +1948,7 @@ public static function createWebhook($object)
19481948
{
19491949
return self::createResource('/hooks', $object);
19501950
}
1951-
1951+
19521952
/**
19531953
* Updates the given webhook.
19541954
*
@@ -1960,7 +1960,7 @@ public static function updateWebhook($id, $object)
19601960
{
19611961
return self::updateResource('/hooks/' . $id, $object);
19621962
}
1963-
1963+
19641964
/**
19651965
* Delete the given webhook.
19661966
*
@@ -2040,7 +2040,7 @@ public static function deleteShippingMethod($zoneId, $methodId)
20402040
{
20412041
return self::deleteResource('/shipping/zones/'. $zoneId . '/methods/'. $methodId);
20422042
}
2043-
2043+
20442044
/**
20452045
* Get collection of product skus by Product
20462046
*

0 commit comments

Comments
 (0)