TycheSoftwares / custom-order-statuses-woocommerce

This Repository is for the Custom Order Statuses for WooCommerce - Lite
3 stars 1 forks source link

Compatibility issue with "ActiveMember360" plugin #116

Open Chetna1510 opened 2 months ago

Chetna1510 commented 2 months ago

Prerequisites

Describe the bug

When the "ActiveMember360" plugin is active alongside the Custom Order Status v2.4.1 plugin, the frontend crashes.

Here is the Fatal error showing on the site:

Fatal error: Uncaught Error: Call to undefined function wp_get_current_user() in C:\xampp\htdocs\wordpress.local\wp-includes\capabilities.php:877 Stack trace: #0 C:\xampp\htdocs\wordpress.local\wp-content\plugins\activemember360\trait.methods.php(2533): current_user_can('publish_pages') #1 C:\xampp\htdocs\wordpress.local\wp-includes\class-wp-hook.php(326): activemember360->filter_the_posts(Array) #2 C:\xampp\htdocs\wordpress.local\wp-includes\plugin.php(256): WP_Hook->apply_filters(Array, Array) #3 C:\xampp\htdocs\wordpress.local\wp-includes\class-wp-query.php(3558): apply_filters_ref_array('the_posts', Array) #4 C:\xampp\htdocs\wordpress.local\wp-includes\class-wp-query.php(3852): WP_Query->get_posts() #5 C:\xampp\htdocs\wordpress.local\wp-includes\post.php(2539): WP_Query->query(Array) #6 C:\xampp\htdocs\wordpress.local\wp-content\plugins\custom-order-statuses-woocommerce\includes\alg-wc-custom-order-statuses-functions.php(121): get_posts(Array) #7 C:\xampp\htdocs\wordpress.local\wp-content\plugins\custom-order-statuses-woocommerce\includes\class-alg-wc-custom-order-statuses-core.php(58): alg_get_custom_order_statuses_from_cpt(true, true) #8 C:\xampp\htdocs\wordpress.local\wp-content\plugins\custom-order-statuses-woocommerce\includes\class-alg-wc-custom-order-statuses-core.php(711): Alg_WC_Custom_Order_Statuses_Core->__construct() #9 C:\xampp\htdocs\wordpress.local\wp-content\plugins\custom-order-statuses-woocommerce\class-alg-wc-custom-order-statuses.php(158): require_once('C:\xampp\htdocs...') #10 C:\xampp\htdocs\wordpress.local\wp-content\plugins\custom-order-statuses-woocommerce\class-alg-wc-custom-order-statuses.php(107): Alg_WC_Custom_Order_Statuses->includes() #11 C:\xampp\htdocs\wordpress.local\wp-content\plugins\custom-order-statuses-woocommerce\class-alg-wc-custom-order-statuses.php(79): Alg_WC_Custom_Order_Statuses->__construct() #12 C:\xampp\htdocs\wordpress.local\wp-content\plugins\custom-order-statuses-woocommerce\class-alg-wc-custom-order-statuses.php(324): Alg_WC_Custom_Order_Statuses::instance() #13 C:\xampp\htdocs\wordpress.local\wp-content\plugins\custom-order-statuses-woocommerce\class-alg-wc-custom-order-statuses.php(328): alg_wc_custom_order_statuses() #14 C:\xampp\htdocs\wordpress.local\wp-content\plugins\custom-order-statuses-woocommerce\custom-order-statuses-for-woocommerce.php(24): include_once('C:\xampp\htdocs...') #15 C:\xampp\htdocs\wordpress.local\wp-settings.php(522): include_once('C:\xampp\htdocs...') #16 C:\xampp\htdocs\wordpress.local\wp-config.php(97): require_once('C:\xampp\htdocs...') #17 C:\xampp\htdocs\wordpress.local\wp-load.php(50): require_once('C:\xampp\htdocs...') #18 C:\xampp\htdocs\wordpress.local\wp-blog-header.php(13): require_once('C:\xampp\htdocs...') #19 C:\xampp\htdocs\wordpress.local\index.php(17): require('C:\xampp\htdocs...') #20 {main} thrown in C:\xampp\htdocs\wordpress.local\wp-includes\capabilities.php on line 877 There has been a critical error on this website.

Learn more about troubleshooting WordPress.

Steps to reproduce

  1. Update/install Custom Order Status v2.4.1
  2. Install "ActiveMember360" plugin activemember360.zip
  3. Visit your site at frontend and you will see the error

Expected behavior

The custom order status plugin shouldn't crash the site even when "ActiveMember360" plugin is active.

WordPress Environment

System Status Report ``` ### WordPress Environment ### WordPress address (URL): [Redacted] Site address (URL): [Redacted] WC Version: 9.0.2 Legacy REST API Package Version: The Legacy REST API plugin is not installed on this site. Action Scheduler Version: ✔ 3.7.4 Log Directory Writable: ✔ WP Version: 6.6 WP Multisite: – WP Memory Limit: 1 GB WP Debug Mode: ✔ WP Cron: ✔ Language: en_US External object cache: – ### Server Environment ### Server Info: Apache/2.4.56 (Win64) OpenSSL/1.1.1t PHP/8.2.4 PHP Version: 8.2.4 PHP Post Max Size: 40 MB PHP Time Limit: 0 PHP Max Input Vars: 1000 cURL Version: 7.85.0 OpenSSL/3.0.8 SUHOSIN Installed: – MySQL Version: 10.4.28-MariaDB Max Upload Size: 40 MB Default Timezone is UTC: ✔ fsockopen/cURL: ✔ SoapClient: ❌ Your server does not have the SoapClient class enabled - some gateway plugins which use SOAP may not work as expected. DOMDocument: ✔ GZip: ✔ Multibyte String: ✔ Remote Post: ✔ Remote Get: ✔ ### Database ### [REDACTED] ### Post Type Counts ### acf-field: 2 acf-field-group: 1 acf-post-type: 1 attachment: 8 custom_css: 1 custom_order_status: 1 customize_changeset: 6 featured_slider: 2 mailpoet_page: 1 page: 10 post: 3 product: 10 recipe: 2 revision: 14 shop_coupon: 1 shop_order: 121 shop_order_placehold: 2 wp_global_styles: 1 wp_navigation: 1 ### Security ### Secure connection (HTTPS): ❌ Your store is not using HTTPS. Learn more about HTTPS and SSL Certificates. Hide errors from visitors: ❌Error messages should not be shown to visitors. ### Active Plugins (3) ### ActiveMember360: by Bob Keen & John Keen ActiveMember360 – 4.3.2 Custom Order Status for WooCommerce: by Tyche Softwares – 2.4.1 WooCommerce: by Automattic – 9.0.2 (update to version 9.1.2 is available) ### Inactive Plugins (6) ### Custom Order Numbers for WooCommerce: by Tyche Softwares – 1.7.1 Custom Order Numbers for WooCommerce Pro: by Tyche Softwares – 1.11.1 Custom Order Status for WooCommerce Pro: by Tyche Softwares – 2.6.2 Order Delivery Date for WooCommerce (Lite version): by Tyche Softwares – 3.21.1 Order Delivery Date Pro for WooCommerce: by Tyche Softwares – 10.13.0 Pickup Date Addon: by Tyche Softwares – 1.2.2 ### Dropin Plugins () ### maintenance.php: maintenance.php ### Settings ### API Enabled: – Force SSL: – Currency: EUR (€) Currency Position: left Thousand Separator: , Decimal Separator: , Number of Decimals: 2 Taxonomies: Product Types: external (external) grouped (grouped) simple (simple) variable (variable) Taxonomies: Product Visibility: exclude-from-catalog (exclude-from-catalog) exclude-from-search (exclude-from-search) featured (featured) outofstock (outofstock) rated-1 (rated-1) rated-2 (rated-2) rated-3 (rated-3) rated-4 (rated-4) rated-5 (rated-5) Connected to WooCommerce.com: – Enforce Approved Product Download Directories: ✔ HPOS feature enabled: – Order datastore: WC_Order_Data_Store_CPT HPOS data sync enabled: – ### Logging ### Enabled: ✔ Handler: Automattic\WooCommerce\Internal\Admin\Logging\LogHandlerFileV2 Retention period: 30 days Level threshold: – Log directory size: 2 MB ### WC Pages ### Shop base: #6 - /shop/ Cart: #7 - /cart/ Checkout: #8 - /checkout/ My account: #9 - /my-account/ Terms and conditions: ❌ Page not set ### Theme ### Name: Storefront Version: 4.6.0 Author URL: https://woocommerce.com/ Child Theme: ❌ – If you are modifying WooCommerce on a parent theme that you did not build personally we recommend using a child theme. See: How to create a child theme WooCommerce Support: ✔ ### Templates ### Overrides: – ### Admin ### Enabled Features: activity-panels analytics product-block-editor coupons core-profiler customize-store customer-effort-score-tracks import-products-task experimental-fashion-sample-products shipping-smart-defaults shipping-setting-tour homescreen marketing mobile-app-banner navigation onboarding onboarding-tasks product-custom-fields remote-inbox-notifications remote-free-extensions payment-gateway-suggestions shipping-label-banner subscriptions store-alerts transient-notices woo-mobile-welcome wc-pay-promotion wc-pay-welcome-page Disabled Features: minified-js new-product-management-experience pattern-toolkit-full-composability product-pre-publish-modal settings async-product-editor-category-field launch-your-store product-editor-template-system Daily Cron: ❌ Not scheduled Options: ✔ Notes: 126 Onboarding: completed ### Action Scheduler ### Complete: 502 Oldest: 2024-06-16 19:38:43 +0000 Newest: 2024-07-17 09:41:42 +0000 Failed: 214 Oldest: 2023-04-08 13:52:55 +0000 Newest: 2024-06-26 20:10:36 +0000 Pending: 1 Oldest: 2024-07-18 09:22:50 +0000 Newest: 2024-07-18 09:22:50 +0000 ### Status report information ### Generated at: 2024-07-17 01:27:51 -10:00 ```

Isolating the problem

Additional field

https://support.tychesoftwares.com/conversation/3000?folder_id=9