Errors/Conflict from Themeco PRO with Custom Development

I’m building a plugin that applies a Woocommerce product discount on the checkout page, but am getting the following errors:

**Notice** : Function id was called incorrectly. Product properties should not be accessed directly. Backtrace: require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/themes/pro/framework/legacy/templates/page.php'), x_get_view, x_render_view, include('/themes/pro/framework/views/integrity/wp-page.php'), x_get_view, x_render_view, include('/themes/pro/framework/views/integrity/content-page.php'), x_get_view, x_render_view, include('/themes/pro/framework/views/global/_content.php'), x_get_view, x_render_view, include('/themes/pro/framework/views/global/_content-the-content.php'), the_content, apply_filters('the_content'), WP_Hook->apply_filters, do_shortcode, preg_replace_callback, do_shortcode_tag, WC_Shortcodes::checkout, WC_Shortcodes::shortcode_wrapper, WC_Shortcode_Checkout::output, WC_Shortcode_Checkout::checkout, wc_get_template, include('/plugins/woocommerce/templates/checkout/form-checkout.php'), WC_Checkout->get_checkout_fields, apply_filters('woocommerce_checkout_fields') in **/home/sites/8b/c/c60f749114/staging_html/wp-includes/functions.php** on line **6078**

I’m not actually calling thesw directly, because I’m going through the woocommerce_cart_calculate_fees hook which is the correct way of doing this.

This problem disappears when I switch theme to one of the Wordpress themes (such as Twenty Twenty Four). Can you shed any light on why this is happening?Are the Woocommerce actions/hooks being overriden by Themeco ones? Should i be calling a Themeco action hook?

I couldn’t find anything in the developer documentation, but I thought I’d ask as I’ve previously found things not documented, by searching through the code.

Can you help?

Hey @sguilliard,

This is not in our developer documentation because this involves WooCommerce integration. Our developer documentation is only related to our products.

Regretfully, we cannot provide support for this case as theme customization is beyond the scope of theme support. We recommend that you hire a freelancer to fix your custom code or subscribe to our One WordPress support to receive guidance on how to override WooCommerce functions that are also used by a theme.

Thank you for understanding.

Hi @sguilliard,

By withdrawing the post, I believe you already have resolved the issue. If not, you can follow the suggestion given by my colleague.

Thanks.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.