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
/** | |
* Hide shipping rates when free shipping is available. | |
* | |
* @param array $rates Array of rates found for the package. | |
* @return array | |
*/ | |
function dokan_vendor_shipping_hide_when_free_is_available( $rates ) { | |
$free = array(); | |
foreach ( $rates as $rate_id => $rate ) { | |
if ( 'free_shipping' === $rate->method_id || 'free_shipping' === $rate->id || strpos( $rate->id, 'free_shipping' ) !== false ) { |
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
/** | |
* Dokan missing geolocation data migrate for products | |
* | |
* @param Int $store_id | |
*/ | |
function dokan_missing_geolocation_data_migrate( $store_id = 0 ) { | |
if ( empty( $store_id ) ) { | |
return; | |
} | |
if ( ! class_exists( 'WeDevs_Dokan' ) ) { |
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
// How Use => Add this scripts on your theme functions.php file | |
// Output => https://prnt.sc/y4ljek | |
/** | |
* Thank you message modified to vendor info on order received page | |
* | |
* @param string $thank_you_title | |
* @param obj $order |
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
/** | |
* Default filter option open on dokan store listing page | |
* | |
* Use this code on main/child theme functions.php file | |
* or use custom plugin for add scripts on footer area | |
*/ | |
function add_custom_scripts_for_store_listing_page_on_footer() { | |
if ( function_exists( 'dokan_is_store_listing' ) && dokan_is_store_listing() ) { | |
?> | |
<script> |
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
/** | |
* Vendor category box hide by click outofbox on dokan store listing page | |
* | |
* Use this code on main/child theme functions.php file | |
* or use custom plugin for add scripts on footer area | |
*/ | |
function add_custom_scripts_for_store_listing_dokan_category_on_footer() { | |
if ( function_exists( 'dokan_is_store_listing' ) && dokan_is_store_listing() ) { | |
?> | |
<script> |
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
/** | |
* Remove external product type for dokan vendors | |
* | |
* @param array $types | |
* | |
* @return array $types | |
*/ | |
function dokan_get_product_types_remove_external_type( $types ) { | |
unset( $types['external'] ); |
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
/** | |
* Add this codes on your parent/child theme functions.php or use custom plugin for add php scripts | |
*/ | |
if ( ! function_exists( 'dokan_woocs_recalculate_order_payment_completed' ) ) { | |
/** | |
* Recalculate order for wc currency switcher support | |
* | |
* @param int $order_id | |
* |
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
/** | |
* Disabled refund emails for dokan sub order | |
* | |
* @param string $recipient | |
* @param string $order | |
* | |
* @return mix | |
*/ |
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
/** | |
* Dokan add new withdraw method | |
* | |
* @param array $methods | |
* | |
* @return array $methods | |
*/ | |
function dokan_add_new_withdraw_method( $methods ) { | |
$methods['custom'] = [ | |
'title' => __( 'Custom', 'dokan-lite' ), |
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
/** | |
* Removed dokan shipping tab from single product page | |
* | |
* @param array $tabs | |
*/ | |
function remove_dokan_registered_product_shipping_tab( $tabs ) { | |
unset( $tabs['shipping'] ); | |
return $tabs; | |
} |
OlderNewer