Skip to content

Instantly share code, notes, and snippets.

Md. Nazmul Hassan nayemDevs

Block or report user

Report or block nayemDevs

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@nayemDevs
nayemDevs / functions.php
Last active Aug 29, 2019
re-order tab on single product page
View functions.php
add_filter( 'woocommerce_product_tabs', 'woo_reorder_tabs', 98 );
function woo_reorder_tabs( $tabs ) {
$tabs['reviews']['priority'] = 5; // Reviews first
$tabs['description']['priority'] = 10; // Description second
$tabs['additional_information']['priority'] = 15; // Additional information third
return $tabs;
}
@nayemDevs
nayemDevs / functions.php
Last active Sep 14, 2019
Show store name on single product page
View functions.php
/*Show store name on single product*/
add_action( 'woocommerce_single_product_summary', 'seller_name_on_single', 12 );
function seller_name_on_single(){
global $product;
$seller = get_post_field( 'post_author', $product->get_id());
$author = get_user_by( 'id', $seller );
$vendor = dokan()->vendor->get( $seller );
$store_info = dokan_get_store_info( $author->ID );
@nayemDevs
nayemDevs / functions.php
Last active Aug 4, 2019
Show Store name on product thumbnail instead of vendor name
View functions.php
<?php
/*
Show Store name on the product thumbnail For Dokan Multivendor plugin
*/
add_action( 'woocommerce_after_shop_loop_item_title','sold_by' );
function sold_by(){
?>
</a>
@nayemDevs
nayemDevs / functions.php
Last active Jan 31, 2019
Change Bank withdraw method fields in vendor dashboard settings in Dokan
View functions.php
<?php
/*
You can change any field title or remove any feild for the vendor -> settings -> payment -> bank transfer method. Please note that this
code need to be placed on your child-theme functions.php file
*/
add_filter( 'dokan_withdraw_methods', 'wp1923_change_whithdraw_callback', 12 );
function wp1923_change_whithdraw_callback( $methods ) {
@nayemDevs
nayemDevs / functions.php
Last active Jun 10, 2019
Override seller setup-wizard via child-theme using Class
View functions.php
<?php
if ( ! class_exists( 'Dokan_Setup_Wizard' ) ) {
require_once DOKAN_INC_DIR . '/admin/setup-wizard.php';
}
class Dokan_Setup_Wizard_Override extends Dokan_Seller_Setup_Wizard {
/**
* Introduction step.
View functions.php
<?php
/*
- Missing icon fixing
- fontawesome v5
- Use the code from line number 7 to 12 on your child-theme functions.php
*/
add_filter ('dokan_get_dashboard_nav','change_icon',16);
function change_icon($urls){
$urls['reviews']['icon'] = '<i class="fas fa-comments"></i>';
$urls['reports']['icon'] = '<i class="fas fa-chart-line"></i>';
@nayemDevs
nayemDevs / functions.php
Last active Sep 14, 2019
adding sold by option on the single product page
View functions.php
add_action( 'woocommerce_single_product_summary', 'seller_name_on_single', 11 );
function seller_name_on_single(){
global $product;
$seller = get_post_field( 'post_author', $product->get_id());
$author = get_user_by( 'id', $seller );
$store_info = dokan_get_store_info( $author->ID );
if ( !empty( $store_info['store_name'] ) ) { ?>
<span class="details">
@nayemDevs
nayemDevs / help.php
Created Oct 11, 2017
Template file for the dashboard menu
View help.php
<?php
/**
* Dokan Dashboard Template
*
* Dokan Main Dahsboard template for Fron-end
*
* @since 2.4
*
* @package dokan
*/
@nayemDevs
nayemDevs / new-menu.php
Last active Sep 14, 2019
Adding extra dashboard menu for Vendor Dashboard ( this code need to be inserted on your theme's functions.php)
View new-menu.php
<?php
//copy from below line
add_filter( 'dokan_query_var_filter', 'dokan_load_document_menu' );
function dokan_load_document_menu( $query_vars ) {
$query_vars['help'] = 'help';
return $query_vars;
}
View gist:086be36e7b51ced25e556e6378a58c02
/*MIME TYPE*/
function wpufe_custom_upload_extensions( $extensions ) {
$extensions['custom'] = array(
'label' => __( 'Custom Extensions', 'wpuf' ),
'ext' => 'eps,ai',
);
return $extensions;
}
You can’t perform that action at this time.