Home Forums Plugins Product Importer Deluxe [Resolved] variable to test if PID is adding product

This topic contains 1 reply, has 2 voices, and was last updated by  Michael Visser 1 year, 12 months ago.

Welcome to our community support forums! We're here to help - but if you have an urgent request for a Pro Plugin, you will get a prioritised response through our Premium Support page.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #46866

    Dima
    Participant

    Hello Michael,
    I have another plugin which uses hook add_action(‘transition_post_status’… . Basically it checks this:
    if ($old_status != ‘publish’ && $new_status == ‘publish’) -> do stuff. I need to also test if this is a PID import, is there a variable that you set that I can test against?

    Thanks

    #46901

    Michael Visser
    Keymaster

    Hi Dima, sure, that makes alot of sense, adding a function to the Plugin might be handy. 🙂

    In the interim you can check to see if a import is currently running via a few different ways:

    – Check for the $import Global that we use for both manual imports via the WordPress Administration and CRON imports
    – Check for the Transient or Option ‘woo_pd_import’ (defaults to Transient unless the woo_pd_override_temp_storage_method Filter has been override)

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘[Resolved] variable to test if PID is adding product’ is closed to new replies.