This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 | |
| // this would go in your theme functions.php file | |
| /** | |
| * Custom product meta field to use as barcode | |
| * | |
| * By default WooCommerce POS will use the SKU field- '_sku' | |
| * You can change the meta key using the following WordPress filter | |
| * |
This file contains hidden or 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 ); |
This file contains hidden or 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 in your theme functions.php file | |
| function my_custom_pos_menu($menu){ | |
| if( is_super_admin() ){ | |
| return $menu; | |
| } | |
| foreach($menu as $key => $item){ | |
| if($item['id'] == 'support') |
This file contains hidden or 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
| // remove relevanssi | |
| remove_filter('posts_request', 'relevanssi_prevent_default_request'); | |
| remove_filter('the_posts', 'relevanssi_query'); |
This file contains hidden or 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
| <body> | |
| <h1>Repro Safari IndexedDB autoIncrement bug</h1> | |
| <div id="logger"></div> | |
| <script> | |
| var dbname = 'time_' + Date.now() + '_'; | |
| function log(msg) { | |
| document.getElementById("logger").innerHTML += msg + "<br>"; | |
| } |
This file contains hidden or 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_action('woocommerce_order_add_product', 'my_custom_product_meta'); | |
| function my_custom_product_meta($id, $item_id, $product) { | |
| wc_add_order_item_meta($item_id, 'serial', $product->get_sku()); | |
| } |
This file contains hidden or 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 | |
| $conn = new mysqli($WORDPRESS_DB_HOST, $WORDPRESS_DB_USER, $WORDPRESS_DB_PASSWORD); | |
| if(!mysqli_select_db($conn , $WORDPRESS_TESTS_DB_NAME)){ | |
| $sql = "CREATE DATABASE $WORDPRESS_TESTS_DB_NAME"; | |
| if ($conn->query($sql) === TRUE) { | |
| echo "Database created successfully"; | |
| } else { | |
| echo "Error creating database: " . $conn->error; | |
| } |