Created
November 10, 2015 16:46
-
-
Save aryeharmon/701ef64d7061c4b88379 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function add_index() { | |
$_SESSION["box"] = $_POST['value']; | |
} | |
if(isset($_SESSION["box"])){ | |
switch ($output) { | |
case 1: | |
$boxcolor = "silver"; | |
break; | |
case 2: | |
$boxcolor = "pink"; | |
break; | |
case 3: | |
$boxcolor = "blue"; | |
break; | |
} | |
global $woocommerce; | |
$woocommerce->cart->add_fee( __('Box Color : '.$boxcolor.'' , 'woocommerce'), 0); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment