{"id":7299,"date":"2014-06-04T04:55:29","date_gmt":"2014-06-04T04:55:29","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/06\/04\/wpml-icl_register_string-throws-fatal-error-but-works-collection-of-common-programming-errors\/"},"modified":"2014-06-04T04:55:29","modified_gmt":"2014-06-04T04:55:29","slug":"wpml-icl_register_string-throws-fatal-error-but-works-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/06\/04\/wpml-icl_register_string-throws-fatal-error-but-works-collection-of-common-programming-errors\/","title":{"rendered":"WPML icl_register_string() throws fatal error but works-Collection of common programming errors"},"content":{"rendered":"<p>I&#8217;m helping someone with a custom plugin and they need it to be WPML compatible. Using the method from WPML I was able to register a string in WPML and output it on the other end. However, when the plugin was initially activated I got a <strong>Call to undefined function icl_register_string()<\/strong> error. It worked, but threw a fatal error. Any idea why this could be? Source: http:\/\/wpml.org\/documentation\/support\/translation-for-texts-by-other-plugins-and-themes\/<\/p>\n<p>Here&#8217;s my code:<\/p>\n<pre><code>\/\/Register Settings with WPML\nicl_register_string( 'Match Previous Order' , 'match_order', 'Do you want these items to match a previous order from Direct Linen? If yes, use \"Additional Notes\" to explain.' );\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;m helping someone with a custom plugin and they need it to be WPML compatible. Using the method from WPML I was able to register a string in WPML and output it on the other end. However, when the plugin was initially activated I got a Call to undefined function icl_register_string() error. It worked, but [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-7299","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/7299","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=7299"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/7299\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=7299"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=7299"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=7299"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}