// http://stackoverflow.com/questions/26581467/creating-woocommerce-order-with-line-item-programatically
$address = array(
'first_name' => 'Fresher',
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
| https://parketdoska.ua/product-category/%D0%BA%D0%BB%D0%B5%D0%BD/?min_price=50&max_price=100 | |
| https://parketdoska.ua/product-tag/3165-ru/?min_price=840&orderby=price&filter_color=beige,brown | |
| https://parketdoska.ua/product-tag/3014-ru/ |
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
| <?php | |
| /* | |
| 💬 Get Google-Reviews with PHP cURL & without API Key | |
| ===================================================== | |
| **This is a dirty but usefull way to grab the first 8 most relevant reviews from Google with cURL and without the use of an API Key** | |
| How to find the needed CID No: | |
| - use: [https://pleper.com/index.php?do=tools&sdo=cid_converter] |
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
| Contributing my 2 cents | |
| $indianStates = ['AR' => 'Arunachal Pradesh', | |
| 'AR' => 'Arunachal Pradesh', | |
| 'AS' => 'Assam', | |
| 'BR' => 'Bihar', | |
| 'CT' => 'Chhattisgarh', | |
| 'GA' => 'Goa', | |
| 'GJ' => 'Gujarat', | |
| 'HR' => 'Haryana', |
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
| To fix the issue use this | |
| chown -R www-data:www-data /var/www/magento2/ | |
| chmod 777 -R var | |
| chmod 777 -R generated | |
| chmod 777 -R app/etc | |
| rm -rf var/cache/* var/page_cache/* var/generation/* | |
| and | |
| php bin/magento setup:di:compile; |
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
| $array = array('apple', 'orange', 'strawberry', 'blueberry', 'kiwi'); | |
| 1- | |
| Use array_search to get the key and remove it with unset if found: | |
| if (($key = array_search('strawberry', $array)) !== false) { | |
| unset($array[$key]); | |
| } | |
| array_search returns false (null until PHP 4.2.0) if no item has been found. |
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
| add_filter( 'woocommerce_add_to_cart_fragments', 'wc_refresh_mini_cart_count'); | |
| function wc_refresh_mini_cart_count($fragments){ | |
| ob_start(); | |
| ?> | |
| <span class="cart-no mini-cart-count"> | |
| <?php echo WC()->cart->get_cart_contents_count(); ?> | |
| </span> | |
| <?php | |
| $fragments['.mini-cart-count'] = ob_get_clean(); | |
| return $fragments; |
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
| In addition to the link provided by Floremin, which clears text selection using JavaScript to "clear" the selection, you can also use pure CSS to accomplish this. The CSS is here... | |
| .noSelect { | |
| -webkit-touch-callout: none; | |
| -webkit-user-select: none; | |
| -khtml-user-select: none; | |
| -moz-user-select: none; | |
| -ms-user-select: none; | |
| user-select: none; | |
| } |
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
| <?php | |
| /* | |
| Plugin Name: WooCustom My Account | |
| Plugin URI: http://wpbeaches.com/ | |
| Description: WooCustom - add a custom area in my-account | |
| Author: Neil Gee | |
| Version: 1.0.0 | |
| Author URI: http://wpbeaches.com | |
| License: GPL-2.0+ |
NewerOlder