activities_controller.php
1 year ago
auth_controller.php
1 year ago
booking_form_settings_controller.php
1 year ago
bookings_controller.php
1 year ago
calendars_controller.php
1 year ago
carts_controller.php
1 year ago
controller.php
1 year ago
customer_cabinet_controller.php
1 year ago
customers_controller.php
1 year ago
dashboard_controller.php
1 year ago
default_agent_controller.php
1 year ago
events_controller.php
1 year ago
form_fields_controller.php
1 year ago
integrations_controller.php
1 year ago
invoices_controller.php
1 year ago
manage_booking_by_key_controller.php
1 year ago
manage_order_by_key_controller.php
1 year ago
notifications_controller.php
1 year ago
orders_controller.php
1 year ago
pro_controller.php
1 year ago
process_jobs_controller.php
1 year ago
processes_controller.php
1 year ago
search_controller.php
1 year ago
services_controller.php
1 year ago
settings_controller.php
1 year ago
steps_controller.php
1 year ago
stripe_connect_controller.php
1 year ago
support_topics_controller.php
1 year ago
todos_controller.php
1 year ago
transactions_controller.php
1 year ago
wizard_controller.php
1 year ago
support_topics_controller.php
41 lines
| 1 | <?php |
| 2 | /* |
| 3 | * Copyright (c) 2024 LatePoint LLC. All rights reserved. |
| 4 | */ |
| 5 | |
| 6 | if ( ! defined( 'ABSPATH' ) ) { |
| 7 | exit; // Exit if accessed directly. |
| 8 | } |
| 9 | |
| 10 | |
| 11 | if ( ! class_exists( 'OsSupportTopicsController' ) ) : |
| 12 | |
| 13 | |
| 14 | class OsSupportTopicsController extends OsController { |
| 15 | |
| 16 | function __construct() { |
| 17 | parent::__construct(); |
| 18 | |
| 19 | $this->views_folder = LATEPOINT_VIEWS_ABSPATH . 'support_topics/'; |
| 20 | } |
| 21 | |
| 22 | function view(){ |
| 23 | $topic = sanitize_text_field($this->params['topic']); |
| 24 | $topic = str_replace(['..', '/'], '', $topic); |
| 25 | |
| 26 | $available_topics = ['payment_request']; |
| 27 | if(in_array($topic, $available_topics)){ |
| 28 | $this->vars['topic'] = $topic; |
| 29 | $response_html = $this->render($this->views_folder.'view', 'none'); |
| 30 | $status = LATEPOINT_STATUS_SUCCESS; |
| 31 | }else{ |
| 32 | $response_html = __('Not Found', 'latepoint'); |
| 33 | $status = LATEPOINT_STATUS_ERROR; |
| 34 | } |
| 35 | $this->send_json( [ 'status' => $status, 'message' => $response_html ] ); |
| 36 | |
| 37 | } |
| 38 | } |
| 39 | |
| 40 | |
| 41 | endif; |