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
# Filetypes | |
*.sql | |
debug.log | |
.DS_Store | |
# Directories | |
node_modules/ | |
/tmp/ | |
/vendor/ |
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 | |
/** | |
* 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) | |
{ |
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 UniversalYums\Admin\Performance; | |
class OrdersList { | |
/** | |
* The single instance of the class. | |
*/ | |
protected static $instance; |
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 | |
/** | |
* 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 |
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 DevPress\Frontend; | |
/** | |
* Class Performance | |
* | |
* @package DevPress\Performance | |
*/ | |
class Performance { |
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 | |
/** | |
* Flag historical renewal orders. | |
* | |
* wp eval-file flag-renewal-orders.php | |
*/ | |
global $wpdb; | |
$last_processed = (int) get_transient( 'uy_last_processed_for_flagging' ); |
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
$cat_args = array( | |
'orderby' => 'name', | |
'order' => 'asc', | |
'hide_empty' => false, | |
); | |
$product_categories = get_terms( 'product_cat', $cat_args ); | |
foreach ( $product_categories as $key => $category ) { | |
$range = reddit_get_category_price_range( $category->term_id ); |
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 | |
/** | |
* Updates product prices. | |
* More about WP CLI scripts: | |
* https://wptheming.com/2021/05/wp-cli-scripts-and-woocommerce/ | |
* | |
* wp eval-file update-product-prices.php | |
*/ | |
$products = get_posts([ |
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 | |
/** | |
* Exports product data. | |
* | |
* More about WP CLI scripts: | |
* https://wptheming.com/2021/05/wp-cli-scripts-and-woocommerce/ | |
* | |
* wp eval-file export-product-data.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
<?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 | |
* |