Skip to content

Instantly share code, notes, and snippets.

Avatar
🐢
Zen Mode ON!!

RaKesh Mandal rkalways

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