Guest User

xoogu error

a guest
Jul 28th, 2015
317
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

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×