WordPress.org

Ready to get started?Download WordPress

Forums

how to use "update_usermeta()" in an independent PHP file inside WP folder (3 posts)

  1. liquidshile
    Member
    Posted 4 years ago #

    I am going to create an independent PHP file in my public_html folder, which will callback by Google Checkout or Paypal and receive payment notification. I want to add user info into Database when it did.

    As I know, I have to use function "update_usermeta()" to add those user information. But the thing is, how can I use it in an file that does not belong to WordPress blog system. Which file should I include or requrie?
    Can I write plugin for it?

    This PHP file is inside the WordPress folder, with wp-login ...

  2. whooami
    Member
    Posted 4 years ago #

    if you want to use native wordpress fucntions inside standalone script than you need to include wp-blog-header.php

  3. liquidshile
    Member
    Posted 4 years ago #

    thanks so much! I will try your suggestion

Topic Closed

This topic has been closed to new replies.

About this Topic