This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| add_filter('woocommerce_registration_redirect', 'ps_wc_registration_redirect'); | |
| function ps_wc_registration_redirect( $redirect_to ) { | |
| if ( is_user_logged_in() ){ | |
| $current_user = wp_get_current_user(); | |
| if( $current_user->roles[0] == 'seller' ) { | |
| $redirect_to = dokan_get_navigation_url( 'settings/store' ); | |
| return $redirect_to; | |
| } | |
| } | |
| return $redirect_to; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| add_filter( 'dokan_store_list_args', 'change_store_list_thumb_size' ); | |
| function change_store_list_thumb_size( $args ) { | |
| $args['image_size'] = 'full'; | |
| return $args; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // Change store thumb size in store listing page | |
| add_filter( 'dokan_store_list_args', 'change_store_list_thumb_size' ); | |
| function change_store_list_thumb_size( $args ) { | |
| $args['image_size'] = 'full'; | |
| return $args; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function wpufe_update_post_geo1( $post_id ) { | |
| function gmw_update_post_type_post_location( $post_id ) { | |
| // Return if it's a post revision | |
| if ( false !== wp_is_post_revision( $post_id ) ) | |
| return; | |
| // check autosave // | |
| if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Add this actions | |
| add_action( 'user_new_form', 'add_seller_store_field', 10 ); | |
| add_action( 'edit_user_created_user', 'add_shop_url_for_seller' , 10, 2); | |
| // Add this filter | |
| add_filter( 'user_profile_update_errors', 'check_fields_add_new_user', 10, 3 ); | |
| function add_shop_url_for_seller( $user_id, $notify ) { | |
| if ( ! $user_id ) { | |
| return; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* Showing the extra field on the registration form */ | |
| add_action('register_form', 'new_register_field'); | |
| function new_register_field() { | |
| ?> | |
| <p> | |
| <label for="first_name"><?php _e('First Name') ?><br /> | |
| <input type="text" name="first_name" id="first_name" class="input" value="<?php echo esc_attr($_POST['first_name']); ?>" size="25" tabindex="20" /> | |
| </label> | |
| </p> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .dokan-dashboard .dokan-dash-sidebar ul.dokan-dashboard-menu li.active, | |
| .dokan-dashboard .dokan-dash-sidebar ul.dokan-dashboard-menu li:hover, | |
| .dokan-dashboard .dokan-dash-sidebar ul.dokan-dashboard-menu li.dokan-common-links a:hover{ | |
| background: #6abb46; | |
| } | |
| input[type="submit"].dokan-btn-theme, a.dokan-btn-theme, .dokan-btn-theme, | |
| input[type="submit"].dokan-btn-theme:hover, | |
| a.dokan-btn-theme:hover, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function _mygd_dequeue_script() { | |
| if(!function_exists('geodir_plugin_url')){return;} | |
| wp_deregister_script( 'chosen' ); | |
| wp_register_script('chosen', geodir_plugin_url() . '/geodirectory-assets/js/chosen.jquery.min.js', array(), GEODIRECTORY_VERSION); | |
| wp_dequeue_style( 'dokan-chosen-style' ); | |
| } | |
| add_action( 'wp_print_scripts', '_mygd_dequeue_script', 100 ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| add_action( 'wp_enqueue_scripts', 'flatsome_child_live_search_script', 78 ); | |
| function flatsome_child_live_search_script() { | |
| global $wp, $extensions_uri; | |
| if ( isset( $wp->query_vars['settings'] ) && $wp->query_vars['settings'] == 'store' ) { | |
| wp_dequeue_script( 'jquery-ui-autocomplete' ); | |
| wp_dequeue_script( 'flatsome-live-search' ); | |
| wp_dequeue_script( 'dokan-tag-it' ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| add_action( 'dokan_seller_meta_fields', 'dokan_load_store_seo_field_in_admin', 10 ); | |
| add_action( 'dokan_process_seller_meta_fields', 'dokan_process_seller_seo_data', 10 ); | |
| function dokan_load_store_seo_field_in_admin( $user ) { | |
| $seo = new Dokan_Pro_Store_Seo(); | |
| $seller_profile = dokan_get_store_info( $user->ID ); | |
| $seo_meta = isset( $seller_profile['store_seo'] ) ? $seller_profile['store_seo'] : array(); |