예제 #1
0
 function wplister_end_item($listing_id, $account_id = null)
 {
     WPLE()->logger->info('ending item ' . $listing_id);
     // if listing_id is an eBay Item ID, find the listing_id automatically
     if (!is_array($listing_id) && strlen($listing_id) > 10) {
         $listing = WPLE_ListingQueryHelper::findItemByEbayID($listing_id, false);
         if ($listing) {
             $listing_id = $listing->id;
         }
     }
     // call EbayController
     $this->initEC($account_id);
     $results = $this->EC->endItemsOnEbay($listing_id);
     $this->EC->closeEbay();
     WPLE()->logger->info('ended item ' . $listing_id);
     return isset($this->EC->lastResults) ? $this->EC->lastResults : false;
 }