{"id":160352,"date":"2024-05-31T11:24:08","date_gmt":"2024-05-31T09:24:08","guid":{"rendered":"https:\/\/de.wordpress.org\/support\/topic\/funktion-update-sicher-erweitern\/"},"modified":"2024-05-31T11:34:21","modified_gmt":"2024-05-31T09:34:21","slug":"funktion-update-sicher-erweitern","status":"publish","type":"topic","link":"https:\/\/de.wordpress.org\/support\/topic\/funktion-update-sicher-erweitern\/","title":{"rendered":"Funktion update-sicher erweitern"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Hallo zusammen, <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">ich m\u00f6chte die Ausgabe von Produkt-Attributen \u00e4ndern bzw. den Funktionsumfang erweitern. z.B. habe ich Ein Produkt, welches zu mehreren Maschinen div. Hersteller passt (attribute:maschinentyp). Die Attribut-Items sind nach dem Muster <\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>\"Hersteller1 Maschine-A3 | Hersteller1 Maschine-XY | Hersteller2 Maschine CD12 | ...\"<\/code> <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">hinterlegt. Die Ausgabe soll nun per Hersteller gruppiert werden und nur der Maschinentyp angezeigt werden:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>Hersteller1: Maschine-A3, Maschine-XY <\/code><br \/><code>Hersteller2: Maschine CD12, ...<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Im Template <em><a href=\"https:\/\/woocommerce.github.io\/code-reference\/files\/woocommerce-templates-single-product-tabs-additional-information.html\">additional_information.php<\/a><\/em> kommt dies bei<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>do_action( 'woocommerce_product_additional_information', $product );<\/code> <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">an. Die eigentliche Funktion <\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>wc_display_product_attributes(<\/code>)<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">ist in <em><a href=\"https:\/\/woocommerce.github.io\/code-reference\/files\/woocommerce-includes-wc-template-functions.html\">wc-template-functions.php<\/a><\/em>, liefert aber nur Strings zur\u00fcck, bzw. klickbar wenn das Attribut als Archiv angelegt ist.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Nun k\u00f6nnte ich diese ja nach meinem Gusto ab\u00e4ndern, habe aber das Gef\u00fchl, dass das keine sehr elegante L\u00f6sung ist und bei einem Update eh wieder r\u00fcckg\u00e4ngig gemacht wird. <br \/><br \/>Wie l\u00f6st man solche Problemstellungen generell? An welcher Stelle k\u00f6nnen Funktionserweiterungen dauerhaft eingepflegt werden? Und wie rufe ich diese ab?<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Oder hat jemand ein Plugin parat, welches gew\u00fcnschte Funktionalit\u00e4t bereitstellt?<\/p>\n","protected":false},"template":"","class_list":["post-160352","topic","type-topic","status-publish","hentry","topic-tag-attribute","topic-tag-attributes","topic-tag-coding","topic-tag-functions","topic-tag-funktionen","topic-tag-php","topic-tag-template"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/de.wordpress.org\/support\/wp-json\/wp\/v2\/topic\/160352","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/de.wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/de.wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":3,"href":"https:\/\/de.wordpress.org\/support\/wp-json\/wp\/v2\/topic\/160352\/revisions"}],"predecessor-version":[{"id":160355,"href":"https:\/\/de.wordpress.org\/support\/wp-json\/wp\/v2\/topic\/160352\/revisions\/160355"}],"wp:attachment":[{"href":"https:\/\/de.wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=160352"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}