Skip to content

Instantly share code, notes, and snippets.

View therakeshm's full-sized avatar
🐢
Zen Mode ON!!

Rakesh Mandal therakeshm

🐢
Zen Mode ON!!
View GitHub Profile
@therakeshm
therakeshm / functions.php
Created November 23, 2018 18:06 — forked from nayemDevs/functions.php
adding sold by option on the single product page
<?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 );