<span class="resolved" aria-label="Resolved" title="Topic is resolved."></span>error:

[ad_1]

Replies: 2

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');

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer