Ready to get started?Download WordPress


WP eCommerce
Code to add Custom Meta (3 posts)

  1. icouper
    Posted 11 months ago #

    I'm trying to create a function that will dynamically add in a custom meta field for a product on save. Can someone point me to the documentation/code that would allow me to do this?

    I'm assuming I can use a standard WP hook to run the function when the product is saved, but I'm not sure what function I need to create a custom metal field for the product.

    Any help would be appreciated.


  2. Lee Willis
    Plugin Author

    Posted 11 months ago #

    You should be able to use standard WP hooks for all of it. Products are custom post types, so you can store info in post meta as you would with a WordPress post.

  3. icouper
    Posted 11 months ago #

    I've tried using "add_post_meta" and "update_post_meta", but I haven't been able to get a custom field to be added.

    I'm using the following custom post type hooks for the function:

    Any thoughts?


You must log in to post.

About this Plugin

About this Topic


No tags yet.