function updateMarketplaceParticipations() { if (!$this->id) { return; } $api = new WPLA_AmazonAPI($this->id); $result = $api->listMarketplaceParticipations(); if (@$result->success) { $this->allowed_markets = maybe_serialize($result->allowed_markets); $this->update(); } elseif ($result->ErrorMessage) { wpla_show_message($result->ErrorMessage, 'error'); } return $result; }