{"id":19000897,"date":"2026-08-24T03:41:49","date_gmt":"2026-08-24T03:41:49","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/undefined-array-key-standard-in-class-wcj-orders-shortcodes\/"},"modified":"2026-08-24T03:41:49","modified_gmt":"2026-08-24T03:41:49","slug":"undefined-array-key-standard-in-class-wcj-orders-shortcodes","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/undefined-array-key-standard-in-class-wcj-orders-shortcodes\/","title":{"rendered":"Undefined array key &#8220;standard&#8221; in class-wcj-orders-shortcodes."},"content":{"rendered":"\n<ol>\n<li><strong>Hi Booster Support,<\/strong> We are experiencing a high-frequency PHP Warning on our site running <strong>Booster Plus for WooCommerce v7.2.3<\/strong> with <strong>PHP 8.3<\/strong>. <strong>Error:<\/strong><code>PHP Warning: Undefined array key \"standard\" in \/wp-content\/plugins\/booster-plus-for-woocommerce\/includes\/shortcodes\/class-wcj-orders-shortcodes.php on line 254<\/code><strong>Environment:<\/strong><ul><li>Booster Plus for WooCommerce: 7.2.3 (latest)<\/li><li>PHP: 8.3<\/li><li>WordPress: 7.0.4<\/li><li>WooCommerce: 9.8.7<\/li><li>Hosting: Pressable<\/li><\/ul><strong>Frequency:<\/strong> 900+ warnings per week (triggered every time <code>[wcj_order_items_table]<\/code> is rendered in PDF invoices\/emails) <strong>Root Cause:<\/strong> Line 254 performs: <code>$atts['standard'] = wcj_sanitize_input_attribute_values( $atts['standard'] );<\/code> The <code>standard<\/code> key is not defined in the shortcode&#8217;s <code>$defaults<\/code> array, so when <code>[wcj_order_items_table]<\/code> is called without explicitly passing <code>standard=\"\"<\/code>, the key does not exist in <code>$atts<\/code>. In PHP 7.x this was silently ignored; in PHP 8.x it triggers an &#8220;Undefined array key&#8221; warning. <strong>Note:<\/strong> The <code>standard<\/code> attribute is not listed in your official documentation at <a href=\"https:\/\/booster.io\/docs\/category-orders\/\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/booster.io\/docs\/category-orders\/<\/a> \u2014 it appears to be an internal key that was never registered in the shortcode defaults. <strong>Suggested Fix:<\/strong><code>\/\/ Change line 254 from: $atts['standard'] = wcj_sanitize_input_attribute_values( $atts['standard'] ); \/\/ To: $atts['standard'] = wcj_sanitize_input_attribute_values( $atts['standard'] ?? '' );<\/code> Or add <code>'standard' =&gt; ''<\/code> to the shortcode&#8217;s <code>$atts<\/code> defaults array so it is always defined. <strong>Impact:<\/strong>\n<ul>\n<li>Error logs are flooded (40%+ of all warnings)<\/li>\n\n\n\n<li>Masks other legitimate errors in logs<\/li>\n\n\n\n<li>No functional breakage for end users, but degrades log readability and increases disk I\/O<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Could you please confirm this will be patched in the next release? In the meantime, we will apply the <code>?? ''<\/code> fix locally. Thank you.<\/li>\n<\/ol>\n","protected":false},"template":"","class_list":["post-19000897","topic","type-topic","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/19000897","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\/19000897\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=19000897"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}