Quantcast
Channel: WordPress.org Forums » [WooCommerce] Support
Viewing all articles
Browse latest Browse all 104029

jimlongo on "[Plugin: WooCommerce - excelling eCommerce] appending info to product when added to cart"

$
0
0

I've confirmed that the $realcode is correct (12345-A)

function nfp_add_id_to_product($title){
    $code = substr($_SERVER['QUERY_STRING'],5,12);
    $realcode = str_replace(array('-0', '-1'),array('-A', '-B'), $code);
    $title =   $title . '-' . $realcode ;
    return $title;

}

Seems like this should change the title of the product throughout - for instance "Keychain" should now become "Keychain-12345-A" but it isn't doing anything.


Viewing all articles
Browse latest Browse all 104029

Trending Articles