• Resolved capucinegaudry

    (@capucinegaudry)


    I’m not finding any documentation on this error I’m getting all over with some codes, the error is special characters must be escaped : [ > ] .

    this is the code

    function cie_titre_page_commande()
    {
        global $woocommerce;
        foreach($woocommerce->cart->get_cart() as $cart_item_key => $cart_item) {
            $product_id = $cart_item['product_id'];
            break;
        }
        
        if ($product_id == 32784) echo 'Offre Flexible';
        else if ($product_id == 19368) echo 'Plan fidèle - Annuel';
        else if ($product_id == 24421) echo 'Plan familial - Annuel';
        else if ($product_id == 19298) echo 'Plan découverte';
        else if ($product_id == 19349) echo 'Plan fidèle mensuel';
        else if ($product_id == 19346) echo 'Plan familial mensuel';
        else if ($product_id == 30918) echo 'évaluation orthopédagogique';
        else if ($product_id == 30920) echo 'évaluation orthophonique';
        else echo 'Page de commande';
    
    }
    add_shortcode('titre_commande', 'cie_titre_page_commande');
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Mircea Sandu

    (@gripgrip)

    Hi @capucinegaudry,

    Can you please make sure you are using an up to date version of WPCode – we had an issue with some characters getting escaped in a previous version which has been fixed.

    You might need to update the code if those got automatically changed but they should not be changed again moving forward.

    Thread Starter capucinegaudry

    (@capucinegaudry)

    Thank you, you are so kind to answer so fast. I just realised it was my mistake. Great plugin BTW!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘error:’ is closed to new replies.