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
// This script detects printing start and stop events based on power consumption. | |
// When the stop event is detected, it waits for 15 minutes to enable printer to cool down and shutdown event is triggered. | |
let CONFIG = { | |
cooldownDelay: 15 * 60 * 1000, // 15 minutes | |
idlePowerMax: 12, // 12 Watts (in reality 7-8W) | |
}; | |
let cooldownTimer = null; | |
let printingStarted = false; |
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 | |
/** | |
* @snippet WooCommerce - Fortnox - Dont sync customers, ever | |
* @author Redlight Media AB / Christopher Hedqvist | |
* @compatible WooCommerce 3.8.0 | |
*/ | |
add_filter( 'obj_fortnox_sync_guest_user', '__return_false' ); | |
add_filter( 'obj_fortnox_sync_user', '__return_false' ); |
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 | |
/** | |
* @snippet WooCommerce - Fortnox plugin by Redlight Media - Add custom field to Fortnox via functions.php | |
* @author Redlight Media AB / Christopher Hedqvist | |
* @compatible WooCommerce 3.5.2 | |
*/ | |
function redlight_fortnox_pnr_guest_customer( $customer, $order_id ) { | |
$organisationsnummer = get_post_meta($order_id, 'organisationsnummer', true); | |
if(!empty($organisationsnummer)){ |
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
<div class="textwidget"><small class="byline"><a href="http://webbab.se" target="_blank" title="Webbyrån WEBBAB i Gävle producerade denna webbplats">Webbproduktion av <br>Webbyrån WEBBAB</a></small><br></div> |
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 | |
/** | |
* @snippet WooCommerce -Fortnox - Set customers email to Order billing emailing | |
* @author Redlight Media AB / Christopher Hedqvist | |
* @compatible WooCommerce 3.9.0 | |
*/ | |
function redlight_fortnox_order_email_to( $orderData, $order_id) { | |
$order = wc_get_order($order_id); | |
$orderData['Order']['EmailInformation']['EmailAddressTo'] = $order->get_billing_email(); | |
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
TESTED ROUTER DEFAULT PASSWORDS: @SpiderSec | |
---------------------------------------------------------------------------------------- | |
Digisol : user=admin,pass=1234 (Tested on DG-HR3400) | |
D-Link : user=Admin,pass=blank (Tested on DIR-615) | |
TP-Link : user=admin,pass=admin (Tested on WR720N 2.0) | |
Ubiquiti : user=ubnt,pass=ubnt (Tested on EdgeRouter 12 (ER-12)) | |
Tenda : user=admin,pass=admin (Tested on Tenda N301 ) | |
Mercusys : user=admin,pass=admin (Tested on Mercury MW305R ) | |
iBall : user=admin,pass=admin (Tested on iB-WRB333N ) | |
Netis : user=guest,pass=guest (Tested on Netis WF2411 ) |
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 | |
/** | |
* @snippet WooCommerce - Fortnox plugin by Redlight Media - (REGISTRED USERS) Set customer Type to Private | |
* @author Redlight Media AB / Christopher Hedqvist | |
* @compatible WooCommerce 3.8.0 | |
*/ | |
function redlight_custom_customer_type( $customer) { | |
$customer['Customer']['Type'] = 'PRIVATE'; | |
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 | |
/** | |
* @snippet WooCommerce -Fortnox - Set # infront of ordernumber, add this to "YourOrderNumber" in Fortnox | |
* @author Redlight Media AB / Christopher Hedqvist | |
* @compatible WooCommerce 8.0.2 | |
*/ | |
function redlight_fortnox_order_ordernumber_prefix( $orderData, $order_id) { | |
$order = wc_get_order($order_id); | |
$orderData['Order']['YourOrderNumber'] = $order->get_meta('_custom_order_number', true); | |
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 | |
/** | |
* @snippet WooCommerce -Fortnox - Set PhoneNumber to Phone2 field in Fortnox | |
* @author Redlight Media AB / Christopher Hedqvist | |
* @compatible WooCommerce 3.8.0 | |
*/ | |
function redlight_fortnox_order_both_phone_fields( $orderData, $order_id) { | |
$order = new WC_Order($order_id); | |
$orderData['Order']['Phone2'] = $order->get_billing_phone(); | |
NewerOlder