Tips and Tricks HQ Support

Support site for Tips and Tricks HQ premium products

  • Home
  • Contact Us
  • Documentation
  • Forum Home
    • Forum
    • Forum Search
    • Forum Login
    • Forum Registration

eStore – Is there a hook for product creation

by

Tips and Tricks HQ Support Portal › Forums › WP eStore Forum › WP eStore Tweaks › eStore – Is there a hook for product creation

Tagged: api, estore api, filter, hooks, Tweaks

  • This topic has 4 replies, 2 voices, and was last updated 6 years, 5 months ago by JanArve.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • October 12, 2016 at 4:15 pm #13769
    JanArve
    Member

    I’m looking for a place to hook into product creation / update to change the available_copies and run another function to create a custom post on product creation with the product id.

    Do you have a hook for right after a product is created and for after a product is updated (in the admin end).

    Is there a hooks list somewhere for eStore? Or an API?

    Thanks,

    Jan

    October 12, 2016 at 11:45 pm #74380
    admin
    Keymaster

    We have the following two action hooks that should help you.

    eStore_new_product_added

    add_action('eStore_new_product_added', 'custom_task_after_product_added', 10, 2);
    function custom_task_after_product_added($data, $prod_id){
    //print_r($data); //uncomment this to see what data is passed here.

    }

    eStore_product_updated

    add_action('eStore_product_updated', 'custom_task_after_product_updated', 10, 2);
    function custom_task_after_product_added($data, $prod_id){
    //print_r($data); //uncomment this to see what data is passed here.

    }

    October 13, 2016 at 5:17 pm #74381
    JanArve
    Member

    Looks like exactly what I need! Thanks a bunch. :)

    Do you also have a hook for when a sale is completed by a customer ( where the inventory is updated )?

    Thanks again,

    Jan

    October 14, 2016 at 1:11 am #74382
    admin
    Keymaster

    Yes. You can use the following hook:

    add_action('eStore_product_database_updated_after_payment', 'custom_task_after_sale', 10, 2);
    function custom_task_after_product_added($payment_data, $cart_items){
    //TODO
    }

    October 14, 2016 at 1:57 pm #74383
    JanArve
    Member

    Perfect!

    Thank you very much.

    Jan

  • Author
    Posts
Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.
Log In

Forum Related

  • Forum Home
  • Forum Search
  • Forum Login

Support Related Forms

  • Contact Us
  • Customer Support
  • Request a Plugin Update
  • Request Fresh Download Links

Useful Links

  • Plugin Upgrade Instructions
  • WP eStore Documentation
  • WP eMember Documentation
  • WP Affiliate Platform Documentation
  • WP PDF Stamper Documentation
  • WP Photo Seller Documentation
  • Tips and Tricks HQ Home Page
  • Our Projects

Quick Setup Video Tutorials

  • WP eStore Video Tutorial
  • WP eMember Video Tutorial
  • WP Affiliate Platform Video Tutorial
  • Lightbox Ultimate Video Tutorial
  • WP Photo Seller Video Tutorial

Our Other Plugins

  • WP Express Checkout
  • Stripe Payments Plugin
  • Simple Download Monitor

Copyright © 2023 | Tips and Tricks HQ