Advertisement
palsushobhan

wcfm-show-single-vendor-card

Jan 24th, 2024
743
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.85 KB | None | 0 0
  1. add_shortcode('wcfm_show_vendor', function($attr) {
  2.     global $WCFMmp;
  3.     $vendor_id = isset($attr['id']) && intval($attr['id']) ? absint($attr['id']) : 0;
  4.     if($vendor_id && wcfm_is_vendor($vendor_id)) {
  5.         ob_start();
  6.         ?>
  7.         <div id="wcfmmp-stores-wrap" class="top-vendor-container">
  8.             <div class="wcfmmp-stores-content">
  9.                 <ul class="top-vendor-list wcfmmp-store-wrap">
  10.                 <?php
  11.                     $args = array('per_row' => 1);
  12.                     $args['store_id'] = $vendor_id;
  13.                     $WCFMmp->template->get_template( 'store-lists/wcfmmp-view-store-lists-card.php', $args );
  14.                 ?>
  15.                 </ul>
  16.             </div>
  17.         </div>
  18.         <?php
  19.         $list = ob_get_contents();
  20.         ob_end_clean();
  21.         return $list;
  22.     }
  23.     return;
  24. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement