[wp-trac] [WordPress Trac] #63794: PHP notice: Array to string conversion in general-template.php
WordPress Trac
noreply at wordpress.org
Thu Aug 7 06:48:22 UTC 2025
#63794: PHP notice: Array to string conversion in general-template.php
--------------------------+---------------------------------------
Reporter: balvantk | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: 6.8.2
Severity: normal | Keywords: needs-patch needs-testing
Focuses: |
--------------------------+---------------------------------------
Test Case: PHP Notice - Array to String Conversion with Multiple Coupons
Environment:
Cart/Checkout: Classic and Block tested
WooCommerce version: (assumed to be recent, e.g., 9.x)
| Step No. | Action | Expected
Result
|
| -------- | -------------------------------------------------- |
------------------------------------------------------------------------------------------------------
|
| 1 | Login as a registered user. | Login
successful
|
| 2 | Add a product to the cart. | Product
is added successfully
|
| 3 | Go to the **Cart page**. | Both
coupons are auto/applied manually and reflected correctly
|
| 4 | Proceed to **Checkout** and place the order. | Order is
placed successfully
|
| 5 | Check the **debug.log** (or other PHP error logs). | ❌ **PHP
Notice:** `Array to string conversion` appears if improper coupon
formatting or output exists. |
This error show in log file
[07-Aug-2025 05:33:32 UTC] $helper: free_gift
[07-Aug-2025 05:33:32 UTC] $current: smart_coupon
[07-Aug-2025 05:33:32 UTC] $helper: smart_coupon
[07-Aug-2025 05:33:32 UTC] $current: smart_coupon
[07-Aug-2025 05:33:32 UTC] $helper: no
[07-Aug-2025 05:33:32 UTC] $current: yes
[07-Aug-2025 05:33:32 UTC] $helper: Array
(
[0] =>
)
[07-Aug-2025 05:33:32 UTC] $current: yes
**[07-Aug-2025 05:33:32 UTC] PHP Notice: Array to string conversion in
C:\laragon\www\StoreApps\wp-includes\general-template.php on line 5313**
[07-Aug-2025 05:33:32 UTC] $helper: no
[07-Aug-2025 05:33:32 UTC] $current: yes
[07-Aug-2025 05:33:32 UTC] $helper: no
[07-Aug-2025 05:33:32 UTC] $current: yes
--
Ticket URL: <https://core.trac.wordpress.org/ticket/63794>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list