Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [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
- [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
- [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
- [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
- the code in function.php file is
- <?php
- function cart_notice() {
- $maximum = 40;
- $current = WC()->cart->subtotal;
- if (sizeof(WC()->cart->get_cart()) !== 0) {
- if ($woocommerce->cart->total < $maximum ) {
- if ( $current < $maximum ) {
- ob_start();
- echo '<div class="woocommerce-message">Få din ordre tilsendt gratis hvis du bestiller for ' . ($maximum - $current) . ' kr. mere!</div>';
- $output = ob_get_clean();
- return $output;
- }
- }
- }
- }
- add_action( 'woocommerce_before_cart', 'cart_notice' );
- add_shortcode( 'cart_notice_sc', 'cart_notice' );
- ?>
- The error says in line 5002 which is from if ($woocommerce->cart->total < $maximum )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement