tribulant

Items count in Shopping Cart plugin

Mar 22nd, 2012
159
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.33 KB | None | 0 0
  1. <?php
  2.  
  3. $items_count = 0;
  4. require_once ABSPATH . 'wp-content/plugins/wp-checkout/wp-checkout.php';
  5. if (class_exists('wpCheckout')) {
  6.     if ($wpCheckout = new wpCheckout()) {
  7.         global $Item;
  8.         $items_count = $Item -> item_count($order_id, 'items');
  9.     }
  10. }
  11.  
  12. if (!empty($items_count)) {
  13.     //output your shopping cart icon here
  14. }
  15.  
  16. ?>
Advertisement
Add Comment
Please, Sign In to add comment