Guest User

Untitled

a guest
Jan 27th, 2016
91
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  
  3. /**
  4. * The Template for displaying product archives, including the main shop page which is a post type archive
  5. *
  6. * This template can be overridden by copying it to yourtheme/woocommerce/archive-product.php.
  7. *
  8. * HOWEVER, on occasion WooCommerce will need to update template files and you (the theme developer).
  9. * will need to copy the new files to your theme to maintain compatibility. We try to do this.
  10. * as little as possible, but it does happen. When this occurs the version of the template file will.
  11. * be bumped and the readme will list any important changes.
  12. *
  13. * @see http://docs.woothemes.com/document/template-structure/
  14. * @author WooThemes
  15. * @package WooCommerce/Templates
  16. * @version 2.0.0
  17. */
  18.  
  19. if ( ! defined( 'ABSPATH' ) ) {
  20. exit; // Exit if accessed directly
  21. }
  22.  
  23. if ( class_exists( 'Groups_User' ) ) {
  24. $redirect = true;
  25. if ( $user_id = get_current_user_id() ) {
  26. $user = new Groups_User( $user_id );
  27. if ( $user->can( 'Approved' ) ) {
  28. $redirect = false;
  29. }
  30. }
  31. if ( $redirect ) {
  32. wp_redirect( get_bloginfo( 'home' ) );
  33. exit;
  34. }
  35. }
  36.  
  37. get_header( 'shop' ); ?>
RAW Paste Data