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
{ | |
"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
<?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. |
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
<VirtualHost *:80> | |
DocumentRoot %TRAVIS_BUILD_DIR% | |
<Directory "%TRAVIS_BUILD_DIR%"> | |
Options FollowSymLinks MultiViews ExecCGI | |
AllowOverride All | |
Order deny,allow | |
Allow from all | |
</Directory> |
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": "Ship Your Idea", | |
"id": 22, | |
"created_at": "2013-06-07T10:46:01Z", | |
"updated_at": "2015-06-25T06:48:13Z", | |
"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
{ | |
"order": { | |
"id": 645, | |
"order_number": 645, | |
"created_at": "2015-01-26T20:00:21Z", | |
"updated_at": "2015-01-26T20:00:21Z", | |
"completed_at": "2015-01-26T20:00:21Z", | |
"status": "completed", | |
"currency": "USD", | |
"total": "79.87", |
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 custom_order_item_meta_hook( $meta_id, $order_item_id, $meta_key, $meta_value ){ | |
if( $meta_key == 'Delivery Date' ){ | |
// Do something | |
} | |
} | |
add_action( 'added_order_item_meta', 'custom_order_item_meta_hook', 10, 4 ); |
OlderNewer