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
<!-- Start: Send variables to GTM --> | |
<script type="text/javascript"> | |
{% if checkout.order_id or checkout.id %} | |
var productId = "", | |
isInsolesOnlyOrder = "true"; | |
{% for line_item in checkout.line_items %} | |
{% if line_item.product.type != 'Insole' %} | |
isInsolesOnlyOrder = "false"; | |
{% endif %} | |
productId += "{{ line_item.product.id }}"; |
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
daniel@myserver:~$ nginx -v | |
nginx version: nginx/1.10.3 (Ubuntu) |
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
location ~ \.php$ { | |
// Include the fastcgi-php.conf file. | |
include snippets/fastcgi-php.conf; | |
fastcgi_pass unix:/run/php/php7.2-fpm.sock; | |
} |
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
// Checking NGINX config file syntax | |
sudo nginx -t | |
// Restart NGINX server | |
sudo service nginx restart |
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
/** | |
* Excludes Post ID from Jetpack's news sitemap. | |
* | |
* @param bool $skip | |
* @param WP_Post $post | |
* | |
* @return bool | |
*/ | |
function jpc_exclude_post_from_news_sitemap( $skip, $post ) { | |
if ( ! $post instanceof WP_Post ) { |
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
# Updates the packages list | |
sudo apt update | |
# Fetches the newwer versions of packages existing on the machine | |
sudo apt upgrade | |
# Install Git | |
sudo apt install git |
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
<?php | |
// @see https://developer.wordpress.org/reference/functions/remove_action/ | |
remove_action( string $tag, callable $function_to_remove, int $priority = 10 ); |
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
<?php | |
/** | |
* Breadcrumbs. | |
* | |
* @see woocommerce_breadcrumb() | |
*/ | |
add_action( 'woocommerce_before_main_content', 'woocommerce_breadcrumb', 20, 0 ); |
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
<?php | |
// To remove a hook, the $function_to_remove and $priority arguments must match with the hook when added. | |
remove_action( 'woocommerce_before_main_content', 'woocommerce_breadcrumb', 20 ); |
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 existing version | |
node --version | |
# Search available Node versions. | |
brew search node | |
# I neeeded a version between > 10.0 < 11. So I chose node@10. | |
brew install node@10 | |
# You can install multiple versions, but you cannot have them available all at once. |