• Resolved hoque2015

    (@hoque2015)


    Hello

    I’m using a custom single product page where ‘Sold by’ not appearing as it was ok in default single product page. I think I need to add_action hook in function.php, can you please let me know the code which should display just after or within woocommerce meta?

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Mark Kevin

    (@mkesteban08)

    Hi @hoque2015 ,

    This could be due to how you edited the single product page, please make sure that you do not remove any default WooCommerce hooks from the product loop in order to display the sold by link or other WC Vendors’ data.

    You can use the WooCommerce’s hook “woocommerce_after_shop_loop_item” to display the sold by link “woocommerce_after_shop_loop_item” filter.

    I hope that this could help. Let me know if you have other questions and I’ll be glad to help.??

    Thread Starter hoque2015

    (@hoque2015)

    Hello

    Below is the code from my theme’s meta.php. Can you please let me know the php code which I can just add after tags or SKU to show ‘sold by’ link?

    <?php do_action( 'woocommerce_product_meta_start' ); ?>
    
    	<div class="product-meta-inner">
    
    		<?php
    		if ( ! $has_brand_image && $brand_html ) :
    			echo wolmart_strip_script_tags( $brand_html );
    		endif;
    		?>
    		<?php echo wc_get_product_category_list( $product->get_id(), ', ', '<span class="posted_in">' . _n( 'Tag:', 'Tags:', count( $product->get_category_ids() ), 'woocommerce' ) . ' ', '</span>' ); ?>
    
    		
    
    		<?php echo wc_get_product_tag_list( $product->get_id(), ', ', '<span class="tagged_as">' . _n( 'Category:', 'Categories:', count( $product->get_tag_ids() ), 'woocommerce' ) . ' ', '</span>' ); ?>
    
    <?php if ( wc_product_sku_enabled() && ( $product->get_sku() || $product->is_type( 'variable' ) ) ) : ?>
    
    			<span class="sku_wrapper">
    				<?php esc_html_e( 'SKU:', 'woocommerce' ); ?>
    				<span class="sku">
    					<?php
    					$sku = $product->get_sku();
    					echo wolmart_escaped( $sku ) ? $sku : esc_html__( 'N/A', 'woocommerce' );
    					?>
    				</span>
    			</span>
    
    		<?php endif; ?>
    
    	</div>

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Sold by display’ is closed to new replies.