Maybe I overlooked it, but as much as I searched, I could not find which action
to hook when a subscription changes price or frequency in Woocommerce Subscriptions.
The documentation says that to support price changes in your payment gateway you have to list subscription_amount_changes
, but nowhere it says which function will be called when the amount actually changes..
Also in the Action reference I was unable to find an action hook which is called when the subscription amount or frequency changes. If anyone has a clue which hook to use or how to implement this particular feature, please tell me.
Edit
Ok thanks for the comments and answer by @Reigel, so if I understand correctly the change of a subscription in the admin menu (which I indeed refer to), has to be handled by the save_post
action. Could you provide a small example how to hook this action and check if it is a subscription and get the $order_id
(I guess this is the same as post_id
?) to use in the subscription management calls?
Thank you very much already!