Getting this error when completing a reservation

Fatal error: Uncaught Error: Call to undefined method Pelago\Emogrifier\HtmlProcessor\HtmlPruner::removeElementsWithDisplayNone() in /home/customer/www/trader.dog/public_html/wp-content/plugins/woocommerce/includes/emails/class-wc-email.php:572 Stack trace: #0 /home/customer/www/trader.dog/public_html/wp-content/plugins/woocommerce/includes/emails/class-wc-email.php(650): WC_Email->style_inline(‘…’) #1 /home/customer/www/trader.dog/public_html/wp-content/plugins/woocommerce/includes/emails/class-wc-email-customer-completed-order.php(69): WC_Email->send(‘jwjexec@gmail.c…’, ‘Your Trader.Dog…’, ‘…’, ‘Content-Type: t…’, Array) #2 /home/customer/www/trader.dog/public_html/wp-includes/class-wp-hook.php(287): WC_Email_Customer_Completed_Order->trigger(3192, Object(Automattic\WooCommerce\Admin\Overrides\Order)) #3 /home/customer/www/trader.dog/public_html/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters(”, Array) #4 /home/customer/www/trader.dog/public_html/wp-includes/plugin.php in /home/customer/www/trader.dog/public_html/wp-content/plugins/woocommerce/includes/emails/class-wc-email.php on line 572

There has been a critical error on your website. Please check your site admin email inbox for instructions.

Learn more about debugging in WordPress.


Solution

(Plugin Editor) woocommerce/includes/emails/class-wc-email.php

  • This had to be edited to bypass an error caused by Emogrifier. 
    Line 564 changed from
    if ( $this->supports_emogrifier() && class_exists( $emogrifier_class ) ) {
    to
    if ( !$this->supports_emogrifier() && class_exists( $emogrifier_class ) ) {

Getting this error when saving some things that use YASR (Yet Another Stars Rating)

Fatal error: Uncaught Error: Call to undefined function get_current_screen() in /home/customer/www/trader.dog/public_html/wp-content/plugins/yet-another-stars-rating-premium/admin/yasr-admin-functions.php:195 Stack trace: #0 /home/customer/www/trader.dog/public_html/wp-content/plugins/yet-another-stars-rating-premium/yasr_pro/admin/editor/YasrProFakeRatings.php(144): yasr_is_gutenberg_page() #1 /home/customer/www/trader.dog/public_html/wp-includes/class-wp-hook.php(289): YasrProFakeRatings::saveRatings(3170) #2 /home/customer/www/trader.dog/public_html/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters(NULL, Array) #3 /home/customer/www/trader.dog/public_html/wp-includes/plugin.php(484): WP_Hook->do_action(Array) #4 /home/customer/www/trader.dog/public_html/wp-includes/post.php(4309): do_action(‘save_post’, 3170, Object(WP_Post), true) #5 /home/customer/www/trader.dog/public_html/wp-includes/post.php(4411): wp_insert_post(Array, false, true) #6 /home/customer/www/trader.dog/public_html/wp-content/plugins/classifie in /home/customer/www/trader.dog/public_html/wp-content/plugins/yet-another-stars-rating-premium/admin/yasr-admin-functions.php on line 195

There has been a critical error on this website. Please check your site admin email inbox for instructions.

Learn more about debugging in WordPress.


Solution

Add the following near the top of
plugin yet-another-stars-rating-premium/admin/yasr-admin-functions.php
right below

if (!defined(‘ABSPATH’)) {
    exit(‘You\’re not allowed to see this page’);
} // Exit if accessed directly

//Added this to try to fix an error 
require_once ABSPATH . '/wp-admin/includes/screen.php';
 

Enable YASR Pro

Add the following near the bottom of
plugin yet-another-stars-rating-premium/yet-another-stars-rating.php
right above

if ( yasr_fs()->is__premium_only() ) {
    //these if can’t be merged
    if ( yasr_fs()->can_use_premium_code() ) {
        //Init Yasr Pro
        require YASR_ABSOLUTE_PATH . ‘/yasr_pro/yasr-pro-init.php’;
    }
}

 require YASR_ABSOLUTE_PATH . '/yasr_pro/yasr-pro-init.php';