• Resolved howy

    (@howy)


    Hi,

    i have a custom plugin that import products from xml and i want to automate the listing process.
    currently i am using the hook ‘wpla_prepare_listing’.

    how can i first check if my product is already listed, then prepare and finally send it to ebay using php?

    thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support WP Lab Support

    (@wp-lab-support)

    Hey @howy.

    Thanks for contacting support and sorry for the delay, I was discussing this with the developer.

    You can prepare the new listings but the verification and publishing will have to be done through WP-Lister since those things take some time to complete and we don’t have the API for those actions.

    Here’s some code that should help you check for existing listings first:

    $product_id = 12345;
    
    $listings = WPLE_ListingQueryHelper::getAllListingsFromPostOrParentID( $product_id );
    
    if ( ! $listings ) {
        do_action( 'wplister_prepare_listing', $product_id );
    }

    Kind regards,
    John

    Thread Starter howy

    (@howy)

    thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Hooks for publish items’ is closed to new replies.