• Resolved bellian

    (@bellian)


    So i am trying to setup a fresh installation of wordpress + Woocommerce + Germanized.
    The first thing i noticed was, that the tax import did not happen at all durin initialisation. Is it possible to reimport them later on?

    But the bigest problem is, that as soon as i add a Product and show it in a list view, the page just breaks with the following error:

    NOTICE: PHP message: PHP Fatal error: ?Uncaught Error: Call to a member function get_deposit_packaging_type_title() on bool in /code/wordpress/wp-content/plugins/woocommerce-germanized/templates/loop/deposit-packaging-type.php:25

    172.24.0.2 - ?15/Jul/2024:14:32:10 +0000 "GET /index.php" 200

    Stack trace:
    #0 /code/wordpress/wp-content/plugins/woocommerce/includes/wc-core-functions.php(345): include()
    #1 /code/wordpress/wp-content/plugins/woocommerce-germanized/includes/wc-gzd-template-functions.php(315): wc_get_template()
    #2 /code/wordpress/wp-includes/class-wp-hook.php(324): woocommerce_gzd_template_loop_deposit_packaging_type()
    #3 /code/wordpress/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
    #4 /code/wordpress/wp-includes/plugin.php(517): WP_Hook->do_action()
    #5 /code/wordpress/wp-content/plugins/woocommerce/src/Blocks/Templates/AbstractTemplateCompatibility.php(198): do_action()
    #6 /code/wordpress/wp-content/plugins/woocommerce/src/Blocks/Templates/ArchiveProductTemplatesCompatibility.php(149): Automattic\WooCommerce\Blocks\Templates\AbstractTemplateCompatibility->get_hooks_buffer()
    #7 /code/wordpress/wp-content/plugins/woocommerce/src/Blocks/Templates/AbstractTemplateCompatibility.php(70): Automattic\WooCommerce\Blocks\Templates\ArchiveProductTemplatesCompatibility->inject_hooks()
    #8 /code/wordpress/wp-includes/class-wp-hook.php(326): Automattic\WooCommerce\Blocks\Templates\AbstractTemplateCompatibility->Automattic\WooCommerce\Blocks\Templates\{closure}()
    #9 /code/wordpress/wp-includes/plugin.php(205): WP_Hook->apply_filters()
    #10 /code/wordpress/wp-includes/class-wp-block.php(510): apply_filters()
    #11 /code/wordpress/wp-includes/class-wp-block.php(443): WP_Block->render()
    #12 /code/wordpress/wp-includes/class-wp-block.php(443): WP_Block->render()
    #13 /code/wordpress/wp-includes/class-wp-block.php(443): WP_Block->render()
    #14 /code/wordpress/wp-includes/blocks.php(1733): WP_Block->render()
    #15 /code/wordpress/wp-includes/blocks.php(1771): render_block()
    #16 /code/wordpress/wp-includes/block-template.php(263): do_blocks()
    #17 /code/wordpress/wp-includes/template-canvas.php(12): get_the_block_template_html()
    #18 /code/wordpress/wp-includes/template-loader.php(106): include('/code/wordpress...')
    #19 /code/wordpress/wp-blog-header.php(19): require_once('/code/wordpress...')
    #20 /code/wordpress/index.php(17): require('/code/wordpress...')
    #21 {main}

    ? thrown in /code/wordpress/wp-content/plugins/woocommerce-germanized/templates/loop/deposit-packaging-type.php on line 25

    I have debugged to the place thtat the “global $product;” is just empty. Therefore “wc_gzd_get_gzd_product($product)” returns false and tries to call a member of that.

    If i fix this issue, it is just another error in its place.

    Is germanized not compatible with the latest Full site editing tools or Woocommerce version?

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter bellian

    (@bellian)

    So there is a simple fix for me:
    the global “$product” is just empty. you can get them using:
    $id = get_the_ID();
    $product = wc_get_product($id);

    By adding this just under the “global $product” solves all other errors too….
    Please fix this ??

    Thread Starter bellian

    (@bellian)

    Ok taxrates can be imported using:
    \Vendidero\EUTaxHelper\Helper::import_tax_rates();

    Ein baldiger Bugfix hier w?re sch?n. Ich verwende Woocommerce (9.1.2) im Block-Editor mit dem neuen Block “Produktsammlung”. Sobald WooCommerce Germanized (1.6.2) aktiviert ist, funktioniert der Block “Liste der Produkt-Kategorien” nicht mehr bzw. man erh?lt die oben beschriebene Fehlermeldung:

    Fatal error: Uncaught Error: Call to a member function get_deposit_packaging_type_title() on bool
    (..) 21 {main} thrown in /wp-content/plugins/woocommerce-germanized/templates/loop/deposit-packaging-type.php on line 24

    Plugin Author vendidero

    (@vendidero)

    @frankomator – ja, ich konnte das jetzt lokal reproduzieren. Vorerst kannst du den Fehler verhindern, indem du in den Germanized-Einstellungen unter Preisauszeichnung > Produktlisten die Preisauszeichnung für Pfand und Verpackungstyp deaktivierst. Grunds?tzlich ist das eher ein shortcoming/bug im Woo Core, den wir jetzt im n?chsten Update patchen. Ich werde das zus?tzlich an Woo reporten.

    Grü?e

    Herzlichen Dank, funktioniert!

    Thread Starter bellian

    (@bellian)

    Danke.
    Ich wei? aber nicht wie nachhaltig es ist auf die globale var $product zu vertrauen.

    W?hre vlt etwas nachhaltiger auf WordPress explizite loop API zurückzugreifen $product = wc_get_product(get_the_ID());

    Thread Starter bellian

    (@bellian)

    Ach, sehe grade WC macht das genau so.. Da ham se wohl vergessen die zu promoten.

    Plugin Author vendidero

    (@vendidero)

    Ja, das habe ich hier reported: https://github.com/woocommerce/woocommerce/issues/49598

    PS: Dennoch gibt es im n?chsten Germanized-Update einen workaround dafür.

    Grü?e

Viewing 8 replies - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.