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
<?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
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
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
function remove_wc_password_meter() { | |
wp_dequeue_script( 'wc-password-strength-meter' ); | |
} | |
add_action( 'wp_print_scripts', 'remove_wc_password_meter', 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( 'wpuf_add_post_after_insert', function( $post_id ) { | |
wp_set_post_terms( $post_id, get_post_meta( $post_id, 'wpuf_hidden_cat', true ), 'your taxonomies name' ); | |
}); |
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
// First Register the Tab by hooking into the 'woocommerce_product_data_tabs' filter | |
add_filter( 'woocommerce_product_data_tabs', 'add_my_custom_product_data_tab' ); | |
function add_my_custom_product_data_tab( $product_data_tabs ) { | |
$product_data_tabs['my-custom-tab'] = array( | |
'label' => __( 'My Custom Tab', 'my_text_domain' ), | |
'target' => 'my_custom_product_data', | |
); | |
return $product_data_tabs; | |
} |
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( 'dashboard' ); | |
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
/* global shipping for each seller into the seller profile */ | |
add_action( 'show_user_profile', 'my_show_extra_profile_fields' ); | |
add_action( 'edit_user_profile', 'my_show_extra_profile_fields' ); | |
function my_show_extra_profile_fields( $user ) { | |
$country_obj = new WC_Countries(); | |
$countries = $country_obj->countries; | |
$states = $country_obj->states; |
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
/* | |
Show Seller name on the product thumbnail | |
For Dokan Multivendor plugin | |
*/ | |
add_action( 'woocommerce_after_shop_loop_item_title','sold_by' ); | |
function sold_by(){ | |
?> | |
</a> | |
<?php |