WPbooking Email Controller

Class WPBooking_Email is used for sending emails when making a payment. Here are the action and filter that the class uses! Load entire email shortcode:  add_action('init', array($this, '_load_email_shortcodes')); Send email after payment:  add_action('wpbooking_send_email_after_checkout', array($this, '_send_order_email_success')); Send an email after changing the order status in admin:  add_action('wpbooking_order_item_changed', array($this, '_send_order_email_for_item_changed')); Preview the email template:  add_action('wp_ajax_wpbooking_booking_email_preview', array($this, '_preview_email')); Function: _send_order_email_success() – Check option send email booking for admin, customer Load […]

Read More

WPbooking Order Controller

Class WPBooking_Payment_Gateways is used for the Order Detail page. Here are the action and filter that the class uses! Check purchase information:  add_action('template_redirect', array($this, '_complete_purchase_validate')); Display purchase information :  add_filter('the_content', array($this, '_show_order_information')); Kiểm tra quyền xem trang thông tin mua hàng:  add_action('template_redirect', array($this, '_check_order_details_permission'));   Function: _complete_purchase_validate() –  Check the status of the order

Function: _show_order_information() –  Show details order information Get Content Order […]

Read More

WPbooking Payment Gateways Controller

Class WPBooking_Payment_Gateways used for check out page for interactive payment. Here are the action and filter that the class uses! Check PHP version:  add_action( 'admin_notices', array($this,'add_php_version_notices') ); Add setting for Wpbooking:  add_filter('wpbooking_settings',array($this,'_add_settings')); Function: add_php_version_notices() –  Return string

Function: _add_settings() –  Return array

Function: get_gateways() –  Return array Get all registered gateways Output Array list gateways Function: get_gateway() – […]

Read More

WPbooking Checkout Controller

The WPBooking_Checkout_Controller class is used for checkout page,  checkout, validate complete purchase for Redirect Gateway, show Order Infomation in Order Detail Page functions. Here are actions and filters that our class used Add To Cart Ajax Handler:  add_action('wp_ajax_wpbooking_add_to_cart', array($this, 'add_to_cart')); Checkout Ajax Handler:  add_action('wp_ajax_wpbooking_do_checkout', array($this, 'do_checkout')); Ajax Checkout Emty Cart :  add_action('wp_ajax_wpbooking_check_empty_cart', array($this, '_check_empty_cart')); Register Shortcode to display Checkout Page: function _register_shortcode(); Register Order Status: function […]

Read More

WPBooking_Service_Controller

WPBooking_Service_Controller is located in /shinetheme/controllers/service.php Here to control the services, load default service types and reviews actions handler Review Actions: Our Review is based on WordPress Comment Save Review Stats after Write Review add_action('comment_post', array($this, '_save_review_stats')); Filter to change comment template to our php file:  add_filter('comments_template', array($this, '_comments_template')); Ajax Handler for action: Vote for Review:  add_action('wp_ajax_wpbooking_vote_review', array($this, '_wpbooking_vote_review')); Author answer/reply for a Review:  add_action('wp_ajax_wpbooking_write_reply', array($this, '_wpbooking_write_reply')); […]

Read More

WPBooking_Order

The WPBooking_Order class is used for manage cart, checkout page, handle cart, checkout, validate complete purchase for Redirect Gateway, show Order Infomation in Order Detail Page functions. Here are actions and filters that our class used Add To Cart Ajax Handler:  add_action('wp_ajax_wpbooking_add_to_cart', array($this, 'add_to_cart')); Delete Cart Item Handler:  add_action('template_redirect', array($this, '_delete_cart_item')); Checkout Ajax Handler:  add_action('wp_ajax_wpbooking_do_checkout', array($this, 'do_checkout')); Validate Complete Purchase: function: _complete_purchase_validate() Register Shortcode to […]

Read More