• Resolved sannadigital

    (@sannadigital)


    Hello, I am trying to use your plugin in a website with PW WooCommerce Gift Cards Pro plugin installed and I get a Fatal Error on woocommerce product page when Custom Price for WooCommerce is active.

    Here it is the error log (original domain name replaced), thanks for your support.

    [27-Dec-2023 17:53:43 UTC] PHP Fatal error: Uncaught TypeError: CPWFreeVendor\WPDesk\Library\CustomPrice\Display::single_add_to_cart_text(): Argument #1 ($text) must be of type string, null given, called in /var/www/vhosts/domain-name.com/httpdocs/wp-includes/class-wp-hook.php on line 324 and defined in /var/www/vhosts/domain-name.com/httpdocs/wp-content/plugins/custom-price-for-woocommerce/vendor_prefixed/wpdesk/custom-price-for-woocommerce-core/src/Display.php:333
    Stack trace: 0 /var/www/vhosts/domain-name.com/httpdocs/wp-includes/class-wp-hook.php(324): CPWFreeVendor\WPDesk\Library\CustomPrice\Display->single_add_to_cart_text() 1 /var/www/vhosts/domain-name.com/httpdocs/wp-includes/plugin.php(205): WP_Hook->apply_filters() 2 /var/www/vhosts/domain-name.com/httpdocs/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php(1936): apply_filters() 3 /var/www/vhosts/domain-name.com/httpdocs/wp-content/plugins/woocommerce/templates/single-product/add-to-cart/variation-add-to-cart-button.php(31): WC_Product->single_add_to_cart_text() 4 /var/www/vhosts/domain-name.com/httpdocs/wp-content/plugins/woocommerce/includes/wc-core-functions.php(345): include(‘…’) 5 /var/www/vhosts/domain-name.com/httpdocs/wp-content/plugins/woocommerce/includes/wc-template-functions.php(3116): wc_get_template() 6 /var/www/vhosts/domain-name.com/httpdocs/wp-includes/class-wp-hook.php(324): woocommerce_single_variation_add_to_cart_button() 7 /var/www/vhosts/domain-name.com/httpdocs/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters() 8 /var/www/vhosts/domain-name.com/httpdocs/wp-includes/plugin.php(517): WP_Hook->do_action() 9 /var/www/vhosts/domain-name.com/httpdocs/wp-content/plugins/woocommerce/templates/single-product/add-to-cart/variable.php(71): do_action() 10 /var/www/vhosts/domain-name.com/httpdocs/wp-content/plugins/woocommerce/includes/wc-core-functions.php(345): include(‘…’) 11 /var/www/vhosts/domain-name.com/httpdocs/wp-content/plugins/woocommerce/includes/wc-template-functions.php(1756): wc_get_template() 12 /var/www/vhosts/domain-name.com/httpdocs/wp-includes/class-wp-hook.php(324): woocommerce_variable_add_to_cart() 13 /var/www/vhosts/domain-name.com/httpdocs/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters() 14 /var/www/vhosts/domain-name.com/httpdocs/wp-includes/plugin.php(517): WP_Hook->do_action() 15 /var/www/vhosts/domain-name.com/httpdocs/wp-content/plugins/woocommerce/includes/wc-template-functions.php(1707): do_action() 16 /var/www/vhosts/domain-name.com/httpdocs/wp-content/plugins/elementor-pro/modules/woocommerce/widgets/product-add-to-cart.php(50): woocommerce_template_single_add_to_cart() 17 /var/www/vhosts/domain-name.com/httpdocs/wp-content/plugins/elementor/includes/base/controls-stack.php(2297): ElementorPro\Modules\Woocommerce\Widgets\Product_Add_To_Cart->render() 18 /var/www/vhosts/domain-name.com/httpdocs/wp-content/plugins/elementor/includes/base/widget-base.php(614): Elementor\Controls_Stack->render_by_mode() 19 /var/www/vhosts/domain-name.com/httpdocs/wp-content/plugins/elementor/includes/base/widget-base.php(755): Elementor\Widget_Base->render_content() 20 /var/www/vhosts/domain-name.com/httpdocs/wp-content/plugins/elementor/includes/base/element-base.php(464): Elementor\Widget_Base->print_content() 21 /var/www/vhosts/domain-name.com/httpdocs/wp-content/plugins/elementor/includes/base/element-base.php(1375): Elementor\Element_Base->print_element() 22 /var/www/vhosts/domain-name.com/httpdocs/wp-content/plugins/elementor/includes/base/element-base.php(464): Elementor\Element_Base->print_content() 23 /var/www/vhosts/domain-name.com/httpdocs/wp-content/plugins/elementor/includes/base/element-base.php(1375): Elementor\Element_Base->print_element() 24 /var/www/vhosts/domain-name.com/httpdocs/wp-content/plugins/elementor/includes/base/element-base.php(464): Elementor\Element_Base->print_content() 25 /var/www/vhosts/domain-name.com/httpdocs/wp-content/plugins/elementor/includes/base/element-base.php(1375): Elementor\Element_Base->print_element() 26 /var/www/vhosts/domain-name.com/httpdocs/wp-content/plugins/elementor/includes/base/element-base.php(464): Elementor\Element_Base->print_content() 27 /var/www/vhosts/domain-name.com/httpdocs/wp-content/plugins/elementor/includes/base/element-base.php(1375): Elementor\Element_Base->print_element() 28 /var/www/vhosts/domain-name.com/httpdocs/wp-content/plugins/elementor/includes/base/element-base.php(464): Elementor\Element_Base->print_content() 29 /var/www/vhosts/domain-name.com/httpdocs/wp-content/plugins/elementor/core/base/document.php(1749): Elementor\Element_Base->print_element() 30 /var/www/vhosts/domain-name.com/httpdocs/wp-content/plugins/elementor-pro/modules/theme-builder/documents/theme-document.php(418): Elementor\Core\Base\Document->print_elements() 31 /var/www/vhosts/domain-name.com/httpdocs/wp-content/plugins/elementor/includes/frontend.php(1179): ElementorPro\Modules\ThemeBuilder\Documents\Theme_Document->print_elements_with_wrapper() 32 /var/www/vhosts/domain-name.com/httpdocs/wp-content/plugins/elementor/core/base/document.php(1193): Elementor\Frontend->get_builder_content() 33 /var/www/vhosts/domain-name.com/httpdocs/wp-content/plugins/elementor/modules/library/documents/library-document.php(76): Elementor\Core\Base\Document->get_content() 34 /var/www/vhosts/domain-name.com/httpdocs/wp-content/plugins/elementor-pro/modules/theme-builder/documents/theme-document.php(158): Elementor\Modules\Library\Documents\Library_Document->get_content() 35 /var/www/vhosts/domain-name.com/httpdocs/wp-content/plugins/elementor-pro/modules/theme-builder/documents/theme-document.php(173): ElementorPro\Modules\ThemeBuilder\Documents\Theme_Document->get_content() 36 /var/www/vhosts/domain-name.com/httpdocs/wp-content/plugins/elementor-pro/modules/theme-builder/documents/single-base.php(93): ElementorPro\Modules\ThemeBuilder\Documents\Theme_Document->print_content() 37 /var/www/vhosts/domain-name.com/httpdocs/wp-content/plugins/elementor-pro/modules/woocommerce/documents/product.php(133): ElementorPro\Modules\ThemeBuilder\Documents\Single_Base->print_content() 38 /var/www/vhosts/domain-name.com/httpdocs/wp-content/plugins/elementor-pro/modules/theme-builder/classes/locations-manager.php(364): ElementorPro\Modules\Woocommerce\Documents\Product->print_content() 39 /var/www/vhosts/domain-name.com/httpdocs/wp-content/plugins/elementor-pro/modules/theme-builder/classes/locations-manager.php(240): ElementorPro\Modules\ThemeBuilder\Classes\Locations_Manager->do_location() 40 [internal function]: ElementorPro\Modules\ThemeBuilder\Classes\Locations_Manager->ElementorPro\Modules\ThemeBuilder\Classes{closure}() 41 /var/www/vhosts/domain-name.com/httpdocs/wp-content/plugins/elementor/modules/page-templates/module.php(207): call_user_func() 42 /var/www/vhosts/domain-name.com/httpdocs/wp-content/plugins/elementor/modules/page-templates/templates/canvas.php(38): Elementor\Modules\PageTemplates\Module->print_content() 43 /var/www/vhosts/domain-name.com/httpdocs/wp-includes/template-loader.php(106): include(‘…’) 44 /var/www/vhosts/domain-name.com/httpdocs/wp-blog-header.php(19): require_once(‘…’) 45 /var/www/vhosts/domain-name.com/httpdocs/index.php(17): require(‘…’) 46 {main}

    thrown in /var/www/vhosts/domain-name.com/httpdocs/wp-content/plugins/custom-price-for-woocommerce/vendor_prefixed/wpdesk/custom-price-for-woocommerce-core/src/Display.php on line 333

    • This topic was modified 11 months, 1 week ago by sannadigital.
Viewing 1 replies (of 1 total)
  • Plugin Support dominikl65

    (@dominikl65)

    Hi,

    It seems that the problem is related to some other plugin used in your shop.
    The plugin or template is trying to modify the filter we are relying on woocommerce_product_single_add_to_cart_text

    We will undertake the work of handling this integration. I will notify you of any updates on this issue.

    Thank you for understanding.

Viewing 1 replies (of 1 total)
  • The topic ‘Error when used with PW WooCommerce Gift Cards Pro’ is closed to new replies.