This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function set_first_post_proc_free() { | |
| global $woocommerce; | |
| $coupon_monthly = "oppf1"; | |
| $coupon_yearly = "oppf2"; | |
| $items = $woocommerce->cart->get_cart(); | |
| foreach ($items as $cart_item_key => $values) { | |
| $product = $values["data"]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // http://paulirish.com/2011/requestanimationframe-for-smart-animating/ | |
| // http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating | |
| // requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel | |
| // MIT license | |
| (function() { | |
| var lastTime = 0; | |
| var vendors = ['ms', 'moz', 'webkit', 'o']; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var f = (function() { | |
| for(var i = 1; i <= 3; i++){ | |
| var j = i + 1; // with block scope, j would be inaccesible outside the for statement | |
| } | |
| return j; // however, j is accessible here, because Javascript doesn't have block scope | |
| })(); | |
| console.log("f: ", f); // as a result, f value is 4, not undefined |