Advertisement
palsushobhan

vendor-store-show-about-on-top-of-products

Oct 4th, 2023
1,480
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.80 KB | None | 0 0
  1. add_action( 'wcfmmp_store_before_products', function() {
  2.     global $WCFMmp;
  3.     $wcfm_store_url = wcfm_get_option( 'wcfm_store_url', 'store' );
  4.     $wcfm_store_name = apply_filters( 'wcfmmp_store_query_var', get_query_var( $wcfm_store_url ) );
  5.     if ( empty( $wcfm_store_name ) ) return;
  6.     $seller_info = get_user_by( 'slug', $wcfm_store_name );
  7.     if ( ! $seller_info ) return;
  8.  
  9.     $store_user = wcfmmp_get_store( $seller_info->ID );
  10.     $store_info = $store_user->get_shop_info();
  11.     $WCFMmp->template->get_template( 'store/wcfmmp-view-store-about.php', array( 'store_user' => $store_user, 'store_info' => $store_info ) );
  12. } );
  13.  
  14. add_filter('wcfmmp_store_tabs', function($store_tabs) {
  15.     if(isset($store_tabs['about'])) {
  16.         unset($store_tabs['about']);
  17.     }
  18.     return $store_tabs;
  19. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement