View delete-fraud-activity-by-ip.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
<?php | |
/** | |
* This script will delete all `on-hold` subscriptions and their orders and users. | |
* It will delete all subscriptions based on IP. | |
* | |
* wp eval-file delete-fraud-activity-by-ip.php 127.0.0.1 | |
* | |
* Dry run: | |
* wp eval-file delete-fraud-activity-by-ip 127.0.0.1 dry | |
* |
View PreventMetaCopy.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
<?php | |
/** | |
* Some meta data should not be copied to subscriptions or renewal orders. | |
*/ | |
namespace UniversalYums\Subscriptions; | |
class PreventMetaCopy { | |
/** |
View delete-completed-order-meta.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
<?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'; |
View ActionSchedulerHighVolume.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
<?php | |
/** | |
* High volume modifications to Action Scheduler. | |
* | |
* Adapted from https://github.com/woocommerce/action-scheduler-high-volume/ | |
* | |
* Increase Action Scheduler batch size, concurrency, timeout period, and claim action query | |
* ORDER BY to process large queues of actions more quickly on servers with more server resources. | |
* | |
* @package UniversalYums\ActionScheduler |
View new-customer-coupon.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
<?php | |
namespace WooCommerce\Tests\New_Customer_Coupon; | |
/** | |
* Class New_Customer_Coupon. | |
* @package WooCommerce\Tests\New_Customer_Coupon | |
*/ | |
class New_Customer_Coupon extends \WC_Unit_Test_Case { |
View estimate-read-time.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
<?php | |
/** | |
* Estimates the reading time for a given piece of $content. | |
* | |
* @param string $content Content to calculate read time for. | |
* @param int $wpm Estimated words per minute of reader. | |
* | |
* @returns int $time Esimated reading time. | |
*/ | |
function prefix_estimated_reading_time( $content = '', $wpm = 300 ) { |
View OrdersList.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
<?php | |
namespace UniversalYums\Admin\Performance; | |
class OrdersList { | |
/** | |
* The single instance of the class. | |
*/ | |
protected static $instance; |
View schedule-products-sale.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
<?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' ) ) { |
View 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
<?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 | |
*/ |
View sync-config.sh
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') |
NewerOlder