Is it possible to assign a value to a custom field once a product is purchased?

[ad_1]

I have a digital product which has a monthly subscription price of £20.

What I would like to do is increment the value of a custom field (ACF) on the users profile by 1 every time this product is purchased or renewed.

Are there any hooks or other methods that I can use to execute code once the product is purchased or renewed?

Many thanks,

Sam

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer