public function find_by_id($id) { if (absint($id) === 0) { return $this->get_free_payment_term(); } return AWPCP_Fee::find_by_id($id); }
private function ajax_delete($id) { $errors = array(); if (is_null(AWPCP_Fee::find_by_id($id))) { $message = _x("The specified Credit Plan doesn't exists.", 'credit plans ajax', 'AWPCP'); $response = array('status' => 'error', 'message' => $message); } else { $this->get_table(); $columns = count($this->table->get_columns()); ob_start(); include AWPCP_DIR . '/admin/templates/admin-panel-fees-delete-form.tpl.php'; $html = ob_get_contents(); ob_end_clean(); $response = array('status' => 'success', 'html' => $html); } return $response; }