Last active
June 16, 2023 17:04
-
-
Save dennisnissle/b901513cc5e721f88ff0e9cbc6efea64 to your computer and use it in GitHub Desktop.
Show GTIN and MPN as product attributes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action( 'woocommerce_product_additional_information', 'my_child_add_ean', 10 ); | |
function my_child_add_ean( $product ) { | |
echo '<p>GTIN: ' . wc_gzd_get_gzd_product( $product )->get_gtin() . '</p>'; | |
echo '<p>MPN: ' . wc_gzd_get_gzd_product( $product )->get_mpn() . '</p>'; | |
} |
functions.php des Child-Themes z.B.
Leider funktioniert es nicht mehr
Auch in Console des Browser kann ich keine Ausgabe feststellen
Muss eventuell dazu trusted shops aktiviert sein ?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Wie und wo baue ich das updatesicher ein ?