Make WordPress Core

Changes between Version 1 and Version 2 of Ticket #45387, comment 11


Ignore:
Timestamp:
03/30/2023 02:22:59 PM (3 years ago)
Author:
ninetyninew
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #45387, comment 11

    v1 v2  
    33An example is if, for example, you are using the twentytwentythree theme with WooCommerce, if you add some custom inline HTML and JS code via the `woocommerce_after_add_to_cart_quantity` hook.
    44
    5 We added a select field with some options, the values of these options are URLs and when selected it redirects the user to the URL in the value, these URLs are concatenated strings based on some PHP conditions and add query args like '&something=1' to the string which is then set as the value of the select options, the build of the URL and the functionality which does the redirect upon selection are in an inline `<script>` tag, the resulting URLs don't remain `&something=1` and get converted to `#038;something=1`, this then means we cannot use the `$_GET['something']`.
     5We added a select field with some options, the values of these options are URLs and when selected it redirects the user to the URL in the value, these URLs are concatenated strings based on some PHP conditions and add query args like `&something=1` to the string which is then set as the value of the select options, the build of the URL and the functionality which does the redirect upon selection are in an inline `<script>` tag, the resulting URLs don't remain `&something=1` and get converted to `#038;something=1`, this then means we cannot use the `$_GET['something']`.
    66
    77If we switch from twentytwentythree to a classic theme, the conversion of `&` to `#038;` doesn't occur.