woocommerce / woocommerce-gateway-paypal-express-checkout

58 stars 65 forks source link

Fatal Error calling is_main_query() still a problem #892

Open nhadsall opened 2 years ago

nhadsall commented 2 years ago

We are getting the same error due to an activity log plugin calling get_the_title( $postID );

Stack trace:
#0 /home/user/public_html/wp-content/plugins/woocommerce-gateway-paypal-express-checkout/includes/class-wc-gateway-ppec-checkout-handler.php(76): is_main_query()
#1 /home/user/public_html/wp-includes/class-wp-hook.php(309): WC_Gateway_PPEC_Checkout_Handler->endpoint_page_titles('Private: Unlock...')
#2 /home/user/public_html/wp-includes/plugin.php(189): WP_Hook->apply_filters('Private: Unlock...', Array)
#3 /home/user/public_html/wp-includes/post-template.php(171): apply_filters('the_title', 'Private: Unlock...', 617344)
#4 /home/user/public_html/wp-content/plugins/aryo-activity-log/hooks/class-aal-hook-posts.php(7): get_the_title(Object(WP_Post))
#5 /home/user/public_html/wp-content/plugins/aryo-activity-log/hooks/class-aal-hook-posts.php(45): AAL_Hook_Posts->_draft_or_post_title(617344)
#6 /home/user/public_html/wp-includes/class-wp-hook.php(307): AAL_Hook_Posts->hooks_transition_post_s in /home/user/public_html/wp-includes/query.php on line 919

https://github.com/woocommerce/woocommerce-gateway-paypal-express-checkout/issues/263#issuecomment-1031550991