/** * Init ajax handlers * * @return void */ function init_ajax() { //withdraw note $withdraw = Dokan_Template_Withdraw::init(); add_action('wp_ajax_note', array($withdraw, 'note_update')); add_action('wp_ajax_withdraw_ajax_submission', array($withdraw, 'withdraw_ajax')); // reviews $reviews = Dokan_Template_reviews::init(); add_action('wp_ajax_dokan_comment_status', array($reviews, 'ajax_comment_status')); add_action('wp_ajax_dokan_update_comment', array($reviews, 'ajax_update_comment')); //settings $settings = Dokan_Template_Settings::init(); add_action('wp_ajax_dokan_settings', array($settings, 'ajax_settings')); add_action('wp_ajax_dokan-mark-order-complete', array($this, 'complete_order')); add_action('wp_ajax_dokan-mark-order-processing', array($this, 'process_order')); add_action('wp_ajax_dokan_grant_access_to_download', array($this, 'grant_access_to_download')); add_action('wp_ajax_dokan_change_status', array($this, 'change_order_status')); add_action('wp_ajax_dokan_contact_seller', array($this, 'contact_seller')); add_action('wp_ajax_dokan_add_variation', array($this, 'add_variation')); add_action('wp_ajax_dokan_link_all_variations', array($this, 'link_all_variations')); add_action('wp_ajax_dokan_save_attributes', array($this, 'save_attributes')); add_action('wp_ajax_dokan_toggle_seller', array($this, 'toggle_seller_status')); add_action('wp_ajax_nopriv_shop_url', array($this, 'shop_url_check')); add_filter('woocommerce_cart_item_name', array($this, 'seller_info_checkout'), 10, 2); }
/** * Init ajax handlers * * @return void */ function init_ajax() { //withdraw note $withdraw = Dokan_Template_Withdraw::init(); add_action('wp_ajax_note', array($withdraw, 'note_update')); add_action('wp_ajax_withdraw_ajax_submission', array($withdraw, 'withdraw_ajax')); // reviews $reviews = Dokan_Template_reviews::init(); add_action('wp_ajax_dokan_comment_status', array($reviews, 'ajax_comment_status')); add_action('wp_ajax_dokan_update_comment', array($reviews, 'ajax_update_comment')); //settings $settings = Dokan_Template_Settings::init(); add_action('wp_ajax_dokan_settings', array($settings, 'ajax_settings')); add_action('wp_ajax_dokan-mark-order-complete', array($this, 'complete_order')); add_action('wp_ajax_dokan-mark-order-processing', array($this, 'process_order')); add_action('wp_ajax_dokan_grant_access_to_download', array($this, 'grant_access_to_download')); add_action('wp_ajax_dokan_change_status', array($this, 'change_order_status')); add_action('wp_ajax_dokan_contact_seller', array($this, 'contact_seller')); add_action('wp_ajax_dokan_add_variation', array($this, 'add_variation')); add_action('wp_ajax_dokan_link_all_variations', array($this, 'link_all_variations')); add_action('wp_ajax_dokan_pre_define_attribute', array($this, 'dokan_pre_define_attribute')); add_action('wp_ajax_dokan_save_attributes', array($this, 'save_attributes')); add_action('wp_ajax_dokan_toggle_seller', array($this, 'toggle_seller_status')); add_action('wp_ajax_shop_url', array($this, 'shop_url_check')); add_action('wp_ajax_nopriv_shop_url', array($this, 'shop_url_check')); add_filter('woocommerce_cart_item_name', array($this, 'seller_info_checkout'), 10, 2); // Shipping ajax hanlding add_action('wp_ajax_dps_select_state_by_country', array($this, 'load_state_by_country')); add_action('wp_ajax_nopriv_dps_select_state_by_country', array($this, 'load_state_by_country')); // Announcement ajax handling add_action('wp_ajax_dokan_announcement_remove_row', array($this, 'remove_announcement')); add_action('wp_ajax_nopriv_dokan_announcement_remove_row', array($this, 'remove_announcement')); // shipping state ajax add_action('wp_ajax_nopriv_dokan_shipping_country_select', array($this, 'get_state_by_shipping_country')); add_action('wp_ajax_dokan_shipping_country_select', array($this, 'get_state_by_shipping_country')); // shipping calculation ajax add_action('wp_ajax_nopriv_dokan_shipping_calculator', array($this, 'get_calculated_shipping_cost')); add_action('wp_ajax_dokan_shipping_calculator', array($this, 'get_calculated_shipping_cost')); // Single product Design ajax add_action('wp_ajax_dokan_save_attributes_options', array($this, 'save_attributes_options')); add_action('wp_ajax_nopriv_dokan_save_attributes_options', array($this, 'save_attributes_options')); add_action('wp_ajax_dokan_save_variations_options', array($this, 'save_variations_options')); add_action('wp_ajax_nopriv_dokan_save_variations_options', array($this, 'save_variations_options')); add_action('wp_ajax_dokan_add_new_variations_options', array($this, 'add_new_variations_options')); add_action('wp_ajax_nopriv_dokan_add_new_variations_options', array($this, 'add_new_variations_options')); add_action('wp_ajax_dokan_remove_single_variation_item', array($this, 'remove_single_variation_item')); add_action('wp_ajax_nopriv_dokan_remove_single_variation_item', array($this, 'remove_single_variation_item')); add_action('wp_ajax_dokan_get_pre_attribute', array($this, 'add_predefined_attribute')); add_action('wp_ajax_nopriv_dokan_get_pre_attribute', array($this, 'add_predefined_attribute')); }
<?php $dokan_template_reviews = Dokan_Template_reviews::init(); $dokan_template_reviews->handle_status(); ?> <div class="dokan-dashboard-wrap"> <?php dokan_get_template('dashboard-nav.php', array('active_menu' => 'reviews')); ?> <div class="dokan-dashboard-content dokan-reviews-content"> <article class="dokan-reviews-area"> <header class="dokan-dashboard-header"> <h1 class="entry-title"><?php _e('Reviews', 'dokan'); ?> </h1> </header><!-- .dokan-dashboard-header --> <?php $dokan_template_reviews->reviews_view(); ?> </article> </div><!-- .dokan-dashboard-content --> </div><!-- .dokan-dashboard-wrap -->