View bedankpagina.php
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 | |
add_action( 'woocommerce_thankyou', 'fw_redirect_custom_thank_you_page'); | |
function fw_redirect_custom_thank_you_page( $order_id ){ | |
$order = wc_get_order( $order_id ); | |
$url = home_url('/YOUR_THANK_YOU_PAGE/'); // <<< change this slug | |
if ( $order->has_status( array('processing', 'completed' ) ) ) { | |
wp_safe_redirect( $url ); | |
exit; | |
} | |
} |
View functions.php
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 | |
add_action( 'wp_enqueue_scripts', 'fw_theme_enqueue_styles', 100 ); | |
function fw_theme_enqueue_styles() { | |
$dependencies = array(); // add here other theme handles, for example from the parent theme or WooCommerce | |
wp_enqueue_style( 'child-style', get_stylesheet_directory_uri() . '/style.css', $dependencies, '1.0.0' ); | |
} |
View woocommerce_archive_description.php
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 | |
// remove the category description above the product list | |
remove_action( 'woocommerce_archive_description', 'woocommerce_taxonomy_archive_description', 10 ); | |
// add the category description below the product list | |
add_action( 'woocommerce_after_shop_loop', 'woocommerce_taxonomy_archive_description', 100 ); |
View functions.php
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 | |
/* | |
Place this code in your functions.php file | |
to show a second description at the end of your | |
product categorie archive. | |
Disclaimer: Use this code snippet ith extreme care and at your own risk. | |
*/ | |
add_action('woocommerce_after_shop_loop', function() { |
View woocommerce_merken.php
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 | |
/* | |
Copy/paste deze code in het functions.php bestand van je child theme. | |
Disclaimer: | |
Afhankelijk van je website instellingen is het mogelijk | |
dat deze code niet werkt of zelfs een storing in je website oproept. | |
Het gebruik van deze code gebeurd op eigen risico! | |
*/ |
View getinvoicelist.php
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 | |
function getInvoices($contact, $page = 0) { | |
global $link, $api, $today, $year_ago; | |
$filters = array( | |
'contact_id' => $contact, | |
'is_sent' => 1, | |
'invoice_date' => array($year_ago, $today) | |
); | |
//print_r($filters); |
View Bestaande_klanten.php
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 | |
add_action('wp_footer', 'fw_get_user_for_clicky'); | |
function fw_get_user_for_clicky() { | |
$current_user = wp_get_current_user(); | |
if ( $current_user->exists() ) { | |
// Vraag je klant/gebruiker eerst om toestemming voordat je deze code toont | |
echo ' | |
<script type="text/javascript"> | |
var clicky_custom = clicky_custom || {}; | |
clicky_custom.visitor = { |
View functions.php
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 | |
// add this code snippet to your child theme's functions.php file | |
add_filter('comment_form_default_fields', 'fw_remove_comment_author_url'); | |
function fw_remove_comment_author_url($fields) { | |
if (isset($fields['url'])) { | |
unset($fields['url']); | |
} | |
return $fields; | |
} |
View .htaccess
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 this code to your .htaccess file (Apache based servers only) | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase / | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_URI} \.(jpg|jpeg|png|gif|bmp|ico|css|js|swf|htm|html|txt|php|asp|aspx)$ [NC] | |
RewriteRule .* - [L,R=404] | |
</IfModule> |
View mysql_db_backup.sh
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
#!/bin/sh | |
# Find out what databases are in mysql and back them up | |
# Delete old backups | |
STARTTIME=` date +%Y%m%d-%H%M ` | |
BACKUP_DIR="/srv/users/serverpilot/apps/backups" | |
LOGFILE="/srv/users/serverpilot/apps/backups/db_backup.log" | |
USER="root" | |
PASSWD="ENTER_ROOT_PASSWORD" | |
KEEP="20" |
NewerOlder