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 | |
/** | |
* Plugin Name: DevPress Price Testing | |
* Plugin URI: https://devpress.com | |
* Description: A plugin to test different pricing variants based on cookies. | |
* Version: 1.0.0 | |
* Author: DevPress | |
* Author URI: https://devpress.com | |
* Text Domain: devpress-price-testing | |
* |
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
#!/bin/bash -e | |
# Default false for flags | |
db=false | |
uploads=false | |
overwrite=false | |
# Checks for flags | |
while getopts dupo option | |
do |
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
.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 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 | |
/** | |
* 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 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 | |
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 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 | |
/** | |
* 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 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 | |
/** | |
* 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 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 | |
/** | |
* 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 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 | |
/** | |
* 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 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
sshenv=yoursite | |
replace=('yoursite.com' 'yoursite.local') |
NewerOlder