This file contains 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 | |
function dokan_order_export_headers($headers){ | |
unset($headers['billing_company']); | |
unset($headers['billing_first_name']); | |
unset($headers['billing_last_name']); | |
unset($headers['billing_email']); | |
unset($headers['billing_phone']); | |
unset($headers['customer_ip']); | |
return $headers; |
This file contains 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_filter('woocommerce_available_payment_gateways', 'show_hide_cod', 10, 1); | |
function show_hide_cod($gateways) { | |
if ( is_page( 'checkout' ) || is_checkout() ){ | |
//list of vendor id to exclude COD | |
$vendor_list = [2]; |
This file contains 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( 'woocommerce_after_shipping_rate' , 'function_to_show_description_for_local_pickup' ); | |
function function_to_show_description_for_local_pickup($method){ | |
if( array_key_exists( "description" , $method->meta_data ) ){ | |
if ( ( $method->id == "local_pickup:4") ){ | |
echo "</br><strong> Address: </strong>".$method->meta_data['description']; |
This file contains 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_shortcode( 'dokan_vendor_dashbord', 'dokan_show_vendor_dashboard_url' ); | |
function dokan_show_vendor_dashboard_url() { | |
if ( ! dokan_is_user_seller( get_current_user_id() ) ) { | |
return; | |
} | |
printf( | |
'<p><a href="%s" class="dokan-btn dokan-btn-theme vendor-dashboard" >%s</a></p>', |
This file contains 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 vendor email alongside the vendor name | |
function add_email_in_cart( $item_data, $cart_item ){ | |
$vendor = dokan_get_vendor_by_product( $cart_item['product_id'] ); | |
if ( ! $vendor || ! $vendor->get_id() ) { | |
return $item_data; | |
} |
This file contains 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 | |
//Remove vendor info tab from the | |
add_filter( 'woocommerce_product_tabs', 'remove_vendor_info_tab' ); | |
function remove_vendor_info_tab ($tabs){ | |
unset($tabs['seller']); | |
return $tabs; | |
} |
This file contains 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 | |
//Show only one shipping fee in case of multivendor checkout | |
remove_filter( 'woocommerce_cart_shipping_packages', 'dokan_custom_split_shipping_packages' ); | |
remove_filter( 'woocommerce_shipping_package_name', 'dokan_change_shipping_pack_name'); | |
remove_action( 'woocommerce_checkout_create_order_shipping_item', 'dokan_add_shipping_pack_meta');` | |
?> |
This file contains 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 | |
//You can use the below-mentioned code to remove any tab from the single store page of Dokan. Just keep the line of unset() | |
//that you need as per your requirement | |
add_filter( 'dokan_store_tabs', 'remove_product_tab', 14); | |
function remove_product_tab( $tabs) { | |
//unset($tabs['products']); //For removing the product tab | |
unset($tabs['terms_and_conditions']); //For removing the terms and conditions tab |
This file contains 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 | |
function single_store_page_product_columns( $columns ){ | |
if( dokan_is_store_page() ){ | |
return $columns = 4; //enter your desired number | |
} else { | |
return $columns; | |
} | |
} | |
add_filter( 'loop_shop_columns', 'single_store_page_product_columns', 99); |
This file contains 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_filter( 'dokan_shipping_status_tracking_providers_list', 'add_shipping_tracking_provider' ); | |
function add_shipping_tracking_provider( $providers ){ | |
$providers['sp-your-custom-name'] = array( //use a custom name instead of sp-your-custom-name as your wish | |
'label' => __( 'Your custom one', 'dokan' ), //This text will be shown in the backend and frontend | |
'url' => '', |
OlderNewer