This file contains 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
// SublimeLinter Settings - User | |
{ | |
"paths": { | |
"linux": [], | |
"osx": ["~/.composer/vendor/squizlabs/php_codesniffer/scripts/", | |
"~/.composer/vendor/squizlabs/php_codesniffer/bin/", | |
"/usr/local/bin/"], | |
"windows": [] | |
}, | |
"linters":{ |
This file contains 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
RewriteEngine On | |
RewriteCond %{HTTPS} off | |
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] |
This file contains 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
find public_html -type d -perm 0777 -exec chmod 755 {} \; | |
find public_html -type f -perm 0666 -exec chmod 644 {} \; | |
This file contains 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
$target_product_id = 13; | |
$product_in_cart = wc_get_product($target_product_id); | |
$stock_value = $product_in_cart->get_stock_quantity(); |
This file contains 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_action( 'woocommerce_before_calculate_totals', 'add_custom_price' ); | |
function add_custom_price( $cart_object ) { | |
$custom_price = 100; // This will be your custome price | |
$target_product_id = 15; | |
foreach ( $cart_object->cart_contents as $value ) { | |
if ( $value['product_id'] == $target_product_id ) { | |
$value['data']->set_price ($custom_price); | |
} |
This file contains 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
sudo apt-get remove account-plugin-aim account-plugin-facebook account-plugin-flickr account-plugin-jabber account-plugin-salut account-plugin-twitter account-plugin-windows-live account-plugin-yahoo aisleriot brltty colord deja-dup deja-dup-backend-gvfs duplicity empathy empathy-common evolution-data-server-online-accounts example-content gnome-accessibility-themes gnome-contacts gnome-mahjongg gnome-mines gnome-orca gnome-screensaver gnome-sudoku gnome-video-effects gnomine landscape-common libsane libsane-common mcp-account-manager-uoa python3-uno rhythmbox rhythmbox-plugins rhythmbox-plugin-zeitgeist sane-utils shotwell shotwell-common telepathy-gabble telepathy-haze telepathy-idle telepathy-indicator telepathy-logger telepathy-mission-control-5 telepathy-salut thunderbird thunderbird-gnome-support totem totem-common totem-plugins unity-scope-audacious unity-scope-chromiumbookmarks unity-scope-clementine unity-scope-colourlovers unity-scope-devhelp unity-scope-firefoxbookmarks unity-scope-gdrive unity-sco |
This file contains 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
// WCAttendees.js | |
// https://gist.github.com/deshabhishek007/1593ca3daa429aa39b6451543a09983a | |
// Prints all WordCamp Attendees Info to Console from Attendee page | |
(function () { | |
var main_array = []; | |
var attendee_list = document.querySelectorAll('.tix-attendee-list li'); | |
attendee_list.forEach(function(person) { |
NewerOlder