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
.page-header { | |
background-color: #f3f3f7; | |
background-repeat: no-repeat; | |
background-position: right center; | |
background-size: auto 375px; | |
height: 375px; | |
// 600px viewport | |
@include breakpoint(m-lg) { | |
background-size: auto 600px; |
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 | |
/** | |
* Deletes customers without orders | |
* | |
* To run the script: | |
* wp eval-file delete-customers-without-orders.php | |
*/ | |
// Query for customers registered since this date. | |
$date_after = '2000-01-01'; |
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 | |
namespace Your_Namespace; | |
use Automattic\WooCommerce\Internal\DataStores\Orders\CustomOrdersTableController; | |
/** | |
* Class Metabox. | |
* | |
* Example for how to add a metabox to the order screen that supports both HPOS and legacy order storage. | |
* More information: https://github.com/woocommerce/woocommerce/wiki/High-Performance-Order-Storage-Upgrade-Recipe-Book#audit-for-order-administration-screen-functions |
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 | |
/** | |
* Workaround to load historic data if WP CLI is not installed. | |
* Update the $code variable to match the coupon code you want to update. | |
* | |
* This code can be loaded in a custom plugin or in your theme's functions.php file. | |
* | |
* A transient is used to prevent the data from being updated more than once, | |
* but this code should be removed as soon as it has run and the table is updated. | |
*/ |
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 | |
/** | |
* Delete postmeta for completed orders created more than X days ago. | |
* | |
* To delete meta on completed orders run: | |
* wp eval-file delete-completed-order-meta.php | |
*/ | |
// Transient allows the script to resume where it left off if interrupted. | |
$transient_name = 'last_processed_order'; |
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 | |
/** | |
* WP CLI script to schedule a sale for specific dates. | |
* | |
* To support scheduled sales to the hour/minute, use this free plugin: | |
* https://wordpress.org/plugins/precise-sales-for-woocommerce/ | |
* | |
* wp eval-file schedule-products-sale.php | |
*/ | |
if ( ! defined( 'ABSPATH' ) ) { |
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 | |
/** | |
* Generate coupon copies from an existing coupon. | |
* Replaces UNQCODE with a unique generated coupon code. | |
* | |
* For more information about this script: | |
* https://devpress.com/wp-cli-script-to-duplicate-woocommerce-coupons/ | |
* | |
* wp eval-file coupon-generator.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
sshenv=yoursite | |
replace=('yoursite.com' 'yoursite.local') |
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
# Filetypes | |
*.sql | |
debug.log | |
.DS_Store | |
# Directories | |
node_modules/ | |
/tmp/ | |
/vendor/ |
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 | |
/** | |
* Determine which Fulfil channel ID to use based on order type, source. | |
* | |
* @param Order $order Order to check | |
* | |
* @return mixed | |
*/ | |
public static function getChannelId(Order $order) | |
{ |
NewerOlder