public static function submitOrderToFBA($post_id) { // make sure we don't submit the same order twice (just a precaution) $status = get_post_meta($post_id, '_wpla_fba_submission_status', true); if ($status && $status != 'failed') { return false; } // should never happen - it might as well read: die('you are doing it wrong'); // create FBA feed $feed = new WPLA_AmazonFeed(); $feed->updateFbaSubmissionFeed($post_id); // mark order as submitted (pending) update_post_meta($post_id, '_wpla_fba_submission_status', 'pending'); $response = new stdClass(); $response->success = true; return $response; }