• I want my customers to be able to spend their “credits” on restricted access. As an example, a customer submits a form for review/feedback/tutoring and that is reflected in the account credits after they submit. Is this possible or can they only be spent on the Woocommerce checkout page?

Viewing 1 replies (of 1 total)
  • Let me help here since I took this plugin apart the last week.
    Credits for each user are stored in the database based on the user ID.

    So, if you want to decrease there credits amount for user after sumbitting a form, you can decrease the amount by getting there id and update the user meta. You have to get there old balance to reduce there balance.

    $old_download_credits_amount = get_user_meta( $user_id, ‘_download_credits’, true);
    update_user_meta( $user_id, ‘_download_credits’, $old_download_credits_amount-$amounttoreduce);

Viewing 1 replies (of 1 total)
  • The topic ‘Credits redeemable outside checkout? Ex. for access to a particular part of site’ is closed to new replies.