{"id":15850554,"date":"2022-07-22T16:01:40","date_gmt":"2022-07-22T16:01:40","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/like-a-function-php-code\/"},"modified":"2022-07-22T16:01:40","modified_gmt":"2022-07-22T16:01:40","slug":"like-a-function-php-code","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/like-a-function-php-code\/","title":{"rendered":"Like a function.php code"},"content":{"rendered":"<p>I need to override WooCommerce core function wc_display_item_meta().<\/p>\n<p>I tested my code in functions.php and it works:<br \/>\n<code><br \/>\nfunction wc_display_item_meta( $item, $args = array() ) {<br \/>\n   \/\/ etc...<br \/>\n}<br \/>\n<\/code><\/p>\n<p>I tried to move my code from functions.php to a Woody Snippet but I cannot save it, the error is:<br \/>\n<code>Cannot redeclare wc_display_item_meta() (previously declared in \/plugins\/woocommerce\/includes\/wc-template-functions.php:3347)<\/code><\/p>\n<p>Any solution?<\/p>\n<p>Thanks!<\/p>\n","protected":false},"template":"","class_list":["post-15850554","topic","type-topic","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/15850554","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/15850554\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=15850554"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}