99 reputation
15
bio website
location
age
visits member for 2 years, 1 month
seen Dec 18 at 13:31

Jul
22
awarded  Notable Question
May
31
revised Query Custom Post Types by date (custom field) range
deleted 58 characters in body
May
31
answered Query Custom Post Types by date (custom field) range
May
24
awarded  Editor
May
24
revised Create Array from custom post type to display a slider
added 132 characters in body
May
24
answered Create Array from custom post type to display a slider
Mar
1
answered Get custom posts with certain ids in a custom loop using a shortcode
Jun
28
awarded  Popular Question
Nov
20
comment WooCommerce - Fixed quantity of a product
You are right, I totally forgot that I could use hooks for this. The problem now however is how to actually get the variation and modify the stock balance. I can not manage to find the appropriate code and since my PHP knowledge is not that good I can not write my own code from scratch. The code I posted in my question does not work. I guess it is because I have to get the products first. I have tried: $order = new WC_Order( $order_id ); $items = $order_info->get_items(); But I don't know how to proceed.
Nov
19
awarded  Supporter
Nov
15
awarded  Teacher
Nov
15
awarded  Student
Nov
15
answered Allowing Yoast SEO plugin to track me
Nov
15
asked WooCommerce - Fixed quantity of a product