php – dakon show vender address on checkout page

Question

I need to show the vender address on checkout page, the farest i’ve got is to show it on single product page, but not even on the product that is on checkout page, ideally is to print it somewhere on the checkout but nothing what i tried works.

 <?php
   add_action( 'woocommerce_before_single_product_summary','sold_by' );
function sold_by(){
?>
    
    <?php
        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">
                   <?php printf( $store_info['address']['street_1']); ?>
                </span>
        <?php 
    } 

    }
   ?>

0
tyrese humphreys 2 months 2022-10-04T19:28:23-05:00 0 Answers 0 views 0

Leave an answer

Browse
Browse