• Resolved stndrdsnz

    (@stndrdsnz)


    I’ve been attempting to track down an issue I’m experiencing on our site since updated from 14.8.1. With 14.9 and 15.0 we’re running into issues with the checkout process from our WooCommerce store. After doing a lot of digging here’s what I’m finding. When a customer attempts to checkout, WooCommerce is creating the order. After creating the order, the wp_post_insert action is being triggered, which is picked up by the Yoast SEO plugin and it begins to do it’s thing. You can see in the section of the stack trace below where the Yoast plugin is being run.

    #17 /public_html/wp-includes/plugin.php(206): WP_Hook->apply_filters(”, Array)
    #18 /public_html/wp-content/plugins/wordpress-seo/src/builders/indexable-link-builder.php(87): apply_filters(‘the_content’, ”)
    #19 /public_html/wp-content/plugins/wordpress-seo/src/builders/indexable-post-builder.php(116): Yoast\WP\SEO\Builders\Indexable_Link_Builder->build(Object(Yoast\WP\SEO\Models\Indexable), ”)
    #20 /public_html/wp-content/plugins/wordpress-seo/src/builders/indexable-builder.php(148): Yoast\WP\SEO\Builders\Indexable_Post_Builder->build(33103, Object(Yoast\WP\SEO\Models\Indexable))
    #21 /public_html/wp-content/plugins/wordpress-seo/src/integrations/watchers/indexable-post-watcher.php(209): Yoast\WP\SEO\Builders\Indexable_Builder->build_for_id_and_type(33103, ‘post’, Object(Yoast\WP\SEO\Models\Indexable))
    #22 /public_html/wp-includes/class-wp-hook.php(289): Yoast\WP\SEO\Integrations\Watchers\Indexable_Post_Watcher->build_indexable(33103)
    #23 /public_html/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters(NULL, Array)
    #24 /public_html/wp-includes/plugin.php(478): WP_Hook->do_action(Array)
    #25 /public_html/wp-includes/post.php(4271): do_action(‘wp_insert_post’, 33103, Object(WP_Post), false)
    #26 /public_html/wp-content/plugins/woocommerce/includes/data-stores/abstract-wc-order-data-store-cpt.php(93): wp_insert_post(Array, true)

    The Yoast SEO plugin is then running the the_content filter at which point the Extra (by Elegant Themes) is getting added and it’s doing it’s content manipulation, at which point an error is being thrown regarding a missing class.

    [07-Oct-2020 03:00:43 UTC] PHP Notice: Trying to get property ‘ID’ of non-object in /public_html/wp-includes/class-wp-query.php on line 4019
    [07-Oct-2020 03:00:43 UTC] PHP Notice: Trying to get property ‘post_title’ of non-object in /public_html/wp-includes/class-wp-query.php on line 4021
    [07-Oct-2020 03:00:43 UTC] PHP Notice: Trying to get property ‘post_name’ of non-object in /public_html/wp-includes/class-wp-query.php on line 4023
    [07-Oct-2020 03:00:43 UTC] PHP Fatal error: Uncaught Error: Class ‘ET_Builder_Element’ not found in /public_html/wp-content/themes/Extra/includes/builder/core.php:6391

    I believe this may be resulting from the WooCommerce checkout process using an ajax endpoint and the theme not loading all of their classes. I’m not sure what exactly changed, but I’ve seen a few other posts that reference the customizer being broken after updating Yoast, and the stack trace does show some of the code hooking into the customizer just prior to the error:

    #3 /public_html/wp-includes/class-wp-hook.php(287): extra_customizer_register_general_layout_settings(Array)
    #4 /public_html/wp-includes/plugin.php(206): WP_Hook->apply_filters(Array, Array)
    #5 /public_html/wp-content/themes/Extra/includes/customizer.php(559): apply_filters(‘extra_customize…’, Array)
    #6 /public_html/wp-content/themes/Extra/includes/customizer.php(467): extra_get_customizer_value_bound_settings()
    #7 /public_html/wp-content/themes/Extra/includes/core.php(962): extra_customizer_selector_classes(‘body’)

    As a previous posted had mentioned they were running version 15.0 and rolling back to 14.8.1 resolved their issue, so I attempted to roll back Yoast SEO and found that I had the error with both 15.0 and 14.9, but once I was back on 14.8.1 the issue cleared up.

    Reviewing the changes in the plugin, I’m seeing that in 14.9.1 the file is added /src/builders/indexable-link-builder.php and it’s in this file where the the_content filter is being applied on line 87.

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Yoast, WooCommerce, and Extra Theme Conflict?’ is closed to new replies.