• Resolved alx359

    (@alx359)


    Upgraded from 7.2.3 to 7.5.0 (latest available at booster.io) and the currency switcher shortcode [wcj_currency_select_drop_down_list] stopped working.

    The reason is in the form element being stripped from the submit() code.

    This is the code in 7.2.3:

    <div class="sw-currency">
    <span class="sw-label">Preferred Currency</span><br>
    <select name="wcj-currency" id="wcj-currency-select" style="" class="" onchange="this.form.submit()">
    <option value="EUR">€ : Euro</option>
    <option value="USD" selected="selected">$ : US dollar</option>
    <option value="GBP">? : Pound sterling</option>
    <option value="AUD">A$ : Australian dollar</option>
    <option value="CAD">C$ : Canadian dollar</option>
    </select>
    <input type="hidden" id="wcj-currency-nonce" name="wcj-currency-nonce" value="b9a9e3f79d">
    <input type="hidden" name="_wp_http_referer" value="/checkout/">
    </div>

    This is the code in 7.5.0:

    <div class="sw-currency">
    <span class="sw-label">Preferred Currency</span><br>
    <select name="wcj-currency" id="wcj-currency-select" class="">
    <option value="EUR">€ : Euro</option>
    <option value="USD">$ : US dollar</option>
    <option value="GBP" selected="selected">? : Pound sterling</option>
    <option value="AUD">A$ : Australian dollar</option>
    <option value="CAD">C$ : Canadian dollar</option>
    </select>
    <input type="hidden" id="wcj-currency-nonce" name="wcj-currency-nonce" value="b9a9e3f79d">
    <input type="hidden" name="_wp_http_referer" value="/checkout/">
    </div>

    Note how the wcj-currency-select line is being stripped from onchange="this.form.submit()"

    The culprit I was able to locate is in \booster-plus-for-woocommerce\includes\classes\class-wcj-shortcodes.php line 405:

    $result = ( is_string( $result ) ? wp_kses_post( $result ) : $result );

    The wp_kses_post function is being too strong here. Commenting out the line above and the issue gets fixed.

Viewing 1 replies (of 1 total)
  • Plugin Contributor David G

    (@gravid7)

    Hi @alx359

    Thanks for reaching out to us.

    We are checking the issue from our side and will get back to you with the solution soon.

Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.