daily pastebin goal
0%
SHARE
TWEET

xoogu error

a guest Jul 28th, 2015 264 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. [28-Jul-2015 20:55:49 UTC] PHP Notice:  Undefined variable: woocommerce in /home/igenero1/public_html/dev.igenero.in/shopping/wp-content/themes/Divi/functions.php on line 5002
  2. [28-Jul-2015 20:55:49 UTC] PHP Notice:  Trying to get property of non-object in /home/igenero1/public_html/dev.igenero.in/shopping/wp-content/themes/Divi/functions.php on line 5002
  3. [28-Jul-2015 20:55:49 UTC] PHP Notice:  Trying to get property of non-object in /home/igenero1/public_html/dev.igenero.in/shopping/wp-content/themes/Divi/functions.php on line 5002
  4. [28-Jul-2015 20:55:49 UTC] PHP Fatal error:  ob_start(): Cannot use output buffering in output buffering display handlers in /home/igenero1/public_html/dev.igenero.in/shopping/wp-content/themes/Divi/functions.php on line 5004
  5.  
  6.  
  7.  
  8. the code in function.php file is
  9.  
  10. <?php
  11. function cart_notice() {
  12.         $maximum = 40;
  13.         $current = WC()->cart->subtotal;
  14.         if (sizeof(WC()->cart->get_cart()) !== 0) {
  15.                 if ($woocommerce->cart->total < $maximum ) {
  16.                         if ( $current < $maximum ) {
  17.                                 ob_start();
  18.                                 echo '<div class="woocommerce-message">Få din ordre tilsendt gratis hvis du bestiller for ' . ($maximum - $current) . ' kr. mere!</div>';
  19.                                 $output = ob_get_clean();
  20.                                 return $output;
  21.                         }
  22.                 }
  23.         }
  24. }
  25. add_action( 'woocommerce_before_cart', 'cart_notice' );
  26. add_shortcode( 'cart_notice_sc', 'cart_notice' );
  27. ?>
  28.  
  29.  
  30. The error says in line 5002 which is from    if ($woocommerce->cart->total < $maximum )
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top