If you have a slow import, or if you're running into a lot of server timeouts, then you can follow these steps to optimize your import.
Follow all of the steps listed here: http://www.wpallimport.com/documentation/troubleshooting/slow-imports/.
| #!/usr/bin/env bash | |
| # for debug output, uncomment: | |
| #set -x | |
| function help { | |
| echo "WordPress cleanup -v 0.5 2018-06-26 / peeter@zone.ee | |
| Usage: |
| <?php | |
| if (!defined('ABSPATH')) { | |
| exit; | |
| } | |
| class CC_WC_Orders_Controller | |
| { | |
| public function Init() | |
| { |
If you have a slow import, or if you're running into a lot of server timeouts, then you can follow these steps to optimize your import.
Follow all of the steps listed here: http://www.wpallimport.com/documentation/troubleshooting/slow-imports/.
| add_filter('woocommerce_new_order_email_allows_resend', '__return_true' ); |
| add_filter( 'gbm_disabled_blocks', function() { | |
| return ['woocommerce/active-filters', 'woocommerce/all-products', 'woocommerce/all-reviews', 'woocommerce/product-best-sellers', 'woocommerce/featured-category', 'woocommerce/featured-product', 'woocommerce/attribute-filter', 'woocommerce/price-filter', 'woocommerce/handpicked-products', 'woocommerce/product-new', 'woocommerce/product-on-sale', 'woocommerce/product-categories', 'woocommerce/product-search', 'woocommerce/products-by-attribute', 'woocommerce/product-category', 'woocommerce/product-tag', 'woocommerce/reviews-by-category', 'woocommerce/reviews-by-product', 'woocommerce/product-top-rated', 'woocommerce/product-button', 'woocommerce/product-sale-badge', 'woocommerce/product-image', 'woocommerce/product-price', 'woocommerce/product-rating', 'woocommerce/product-summary', 'woocommerce/product-title'] | |
| }); |
| <?php | |
| class R_Mailer { | |
| function Send() { | |
| error_log( wp_debug_backtrace_summary() ); | |
| } | |
| } | |
| add_action( 'phpmailer_init', function( &$mailer ) { | |
| $mailer = new R_Mailer(); |
| add_action( 'phpmailer_init', 'fix_my_email_return_path' ); | |
| function fix_my_email_return_path( $phpmailer ) { | |
| $phpmailer->Sender = $phpmailer->From; | |
| } |
| <?php | |
| /** | |
| * This is a filter for wp_mail(). It checks the subject | |
| * for the presence of a given string (in this case "New | |
| * User Registration"), and if that returns true it | |
| * sets the "to" address/value. | |
| */ | |
| add_filter( 'wp_mail', 'my_wp_mail_filter' ); | |
| function my_wp_mail_filter( $args ) { |
| <?php // DO NOT include this line. Add below to your theme functions.php | |
| /** | |
| * Add bcc address to email based on contents | |
| * of the email subject line. | |
| * | |
| * Set email address and content of the subject | |
| * line for the email being filtered. | |
| */ | |
| add_filter( 'wp_mail', 'custom_mails' ); |
| <?php | |
| /* | |
| * Set the following constants in wp-config.php. | |
| * These should be added somewhere BEFORE the constant ABSPATH is defined. | |
| * | |
| * Author: Chad Butler | |
| * Author URI: https://butlerblog.com | |
| * | |
| * For more information and instructions, see: https://b.utler.co/Y3 |