You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I lilke you plugin - its very usefull.
After upgrading to woocommerce 2.6.x and switching to new Wordpress-WC-API endpoint /wp-json/wc/v1/ the plugin stopped working.
After digging and debugging around for a while I've found out, that they have renamed the actions and they also missed to add one action which is needed by your plugin.
So the first change in your wc-api-custom-meta.php is to replace:
So, what I did, is to patch woocommerce as follows:
--- /public/wp-content/plugins/woocommerce/includes/api/class-wc-rest-products-controller.php Di Jun 14 22:40:48 2016
+++ /public/wp-content/plugins/woocommerce/includes/api/class-wc-rest-products-controller.php Di Jun 14 22:44:49 2016
@@ -1270,6 +1270,9 @@ class WC_REST_Products_Controller extends WC_REST_
}
}
+ // Do action for product type => needed for des-wc-api-custom-meta to save custom meta data via rest api
+ do_action( 'woocommerce_rest_process_product_meta_' . $product_type, $product, $request );
+
return true;
}
Now everything is working again.
I'm not sure what is the best way to update your plugin, as the calls depend on the api version used.
On the woocommerce side it would be great if the would readd the action, but as far as I've read, the are not very happy with updating meta through api anyway, so that I'm not sure if the will add the missing action. But why not try at least, I've just filed an issue about this case, see woocommerce/woocommerce#11495
Kind regards
Andreas
The text was updated successfully, but these errors were encountered:
Hi,
I lilke you plugin - its very usefull.
After upgrading to woocommerce 2.6.x and switching to new Wordpress-WC-API endpoint /wp-json/wc/v1/ the plugin stopped working.
After digging and debugging around for a while I've found out, that they have renamed the actions and they also missed to add one action which is needed by your plugin.
So the first change in your
wc-api-custom-meta.php
is to replace:As for the missing do_action call:
Please compare:
So, what I did, is to patch woocommerce as follows:
Now everything is working again.
I'm not sure what is the best way to update your plugin, as the calls depend on the api version used.
On the woocommerce side it would be great if the would readd the action, but as far as I've read, the are not very happy with updating meta through api anyway, so that I'm not sure if the will add the missing action. But why not try at least, I've just filed an issue about this case, see woocommerce/woocommerce#11495
Kind regards
Andreas
The text was updated successfully, but these errors were encountered: