Missing Closing HTML Tag Issue in Settings Page
-
Issue Description:
When accessing the WooCommerce settings section provided by the “Product Customer List for WooCommerce” plugin and having the Query Monitor plugin enabled, it becomes apparent that there is an issue with a missing closing HTML tag.
Issue Screenshot Link: View ScreenshotSteps to Reproduce:
- Enable the “Product Customer List for WooCommerce” plugin.
- Navigate to the WooCommerce settings section offered by the plugin.
- Ensure that the Query Monitor plugin is enabled.
Observed Behavior:
Upon inspecting the HTML code, it is evident that there is a missing closing tag, specifically a closing tag for a section.Investigation:
Upon further investigation, I located the relevant code responsible for this issue in the filelib/Wpcl_Settings.php
, specifically on Line Number 425. The code in question is as follows:$settings_wpcl[] = [ 'name' => __( 'Looking for other options?', 'wc-product-customer-list' ), 'id' => 'wpcl_upgrade', 'type' => 'title', ];
This code initiates a section with the
title
type, but it lacks the necessary code to close the section properly, resulting in HTML rendering issues.Solution:
To address this HTML rendering issue, it is recommended to add the following code immediately after the code block mentioned above:$settings_wpcl[] = [ 'type' => 'sectionend', 'id' => 'wpcl_upgrade', ];
This additional code will properly close the section and resolve the HTML rendering issue.
Please consider implementing this fix in the next plugin update to ensure a smooth user experience for your users.
- The topic ‘Missing Closing HTML Tag Issue in Settings Page’ is closed to new replies.