{"id":13582604,"date":"2020-10-26T17:42:44","date_gmt":"2020-10-26T17:42:44","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/php-constants-cause-errors\/"},"modified":"2020-10-26T17:42:44","modified_gmt":"2020-10-26T17:42:44","slug":"php-constants-cause-errors","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/php-constants-cause-errors\/","title":{"rendered":"PHP Constants cause errors"},"content":{"rendered":"<p>When using PHP functions that use PHP constants in the function, WP All Import throws an error. <\/p>\n<p>For example, this error: &#8220;Unexpected token TEXT&#8221; comes from when using:<br \/>\n<code>[str_pad({location_zip[1]}, 5, &quot;0&quot;, STR_PAD_LEFT)]<\/code><\/p>\n<p>But if I change the constant to the integer value, it works fine. Eg:<br \/>\n<code>[str_pad({location_zip[1]}, 5, &quot;0&quot;, 0)]<\/code><\/p>\n","protected":false},"template":"","class_list":["post-13582604","topic","type-topic","status-publish","hentry","topic-tag-constant","topic-tag-php-function"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/13582604","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\/13582604\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=13582604"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}