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
/** | |
* Change default filter of orders in WP admin | |
* add this to your functions.php file | |
*/ | |
add_action( 'admin_menu', 'change_default_order_filter', 99 ); | |
function change_default_order_filter() { | |
global $submenu; | |
if (isset($submenu['woocommerce'])) { | |
$submenu['woocommerce'][1][2] = 'edit.php?post_type=shop_order&shop_order_status=pending,processing'; | |
} |
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
function log_new_orders() { | |
error_reporting(0); | |
$log = new WC_Logger(); | |
$log->add('woocommerce-pos', print_r(debug_backtrace(), true)); | |
} | |
add_action( 'save_post_shop_order', 'log_new_orders' ); |
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
function log_all_emails($mail) { | |
error_reporting(0); | |
$log = new WC_Logger(); | |
$log->add('woocommerce-pos', print_r($mail, true)); | |
return $mail; | |
} | |
add_filter( 'wp_mail', 'log_all_emails' ); |
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
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title><?php _e( 'Receipt', 'woocommerce-pos' ); ?></title> | |
<style> | |
/* Reset */ | |
* { | |
background: transparent !important; | |
color: #000 !important; | |
box-shadow: none !important; |
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
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title><?php _e( 'Receipt', 'woocommerce-pos' ); ?></title> | |
<style> | |
/* Reset */ | |
* { | |
background: transparent !important; | |
color: #000 !important; | |
box-shadow: none !important; |
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
{ | |
"product": { | |
"title": "Glasschale \"Grosse Welle\"", | |
"id": 4116, | |
"created_at": "2012-04-09T20:29:31Z", | |
"updated_at": "2015-03-14T10:26:32Z", | |
"type": "variable", | |
"status": "publish", | |
"downloadable": false, | |
"virtual": 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
{ | |
"product": { | |
"title": "L\u00f6we aus recycelten Flip Flops", | |
"id": 12250, | |
"created_at": "2015-05-04T20:50:38Z", | |
"updated_at": "2015-05-06T10:48:46Z", | |
"type": "variable", | |
"status": "publish", | |
"downloadable": false, | |
"virtual": 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
{ | |
"product": { | |
"title": "Y-Ply", | |
"id": 7480, | |
"created_at": "2013-03-09T14:35:36Z", | |
"updated_at": "2014-06-26T21:31:51Z", | |
"type": "variable", | |
"status": "publish", | |
"downloadable": false, | |
"virtual": 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
{ | |
"product": { | |
"title": "Between Battles", | |
"id": 27540, | |
"created_at": "2015-06-12T00:59:52Z", | |
"updated_at": "2015-06-12T01:08:11Z", | |
"type": "variable", | |
"status": "publish", | |
"downloadable": false, | |
"virtual": 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 | |
/* Path to the WordPress codebase you'd like to test. Add a backslash in the end. */ | |
define( 'ABSPATH', '/srv/www/woopos/htdocs/' ); | |
// Test with multisite enabled. | |
// Alternatively, use the tests/phpunit/multisite.xml configuration file. | |
// define( 'WP_TESTS_MULTISITE', true ); | |
// Force known bugs to be run. |
OlderNewer