Using Global Variable as Price for Variant I'm trying to set the price of the item being added to the cart by a global variable, which is a number field. Here's what I have:

craft()-&gt;on('commerce_lineItems.onPopulateLineItem', function($event)
{
    $lineItem = $event-&gt;params['lineItem'];
    $globalPrices = craft()-&gt;globals-&gt;getSetByHandle('defaultPrices');
    $itemPrice = var_dump($globalPrices-&gt;fontStylePrice);
    $lineItem-&gt;price = $itemPrice;


This just results in a $0 price being set, and not the value from the Global Variable. But again, $lineItem-&gt;price = 25 works fine. Any suggestions?
Removed the var_dump() from setting the variable as follows, and it works perfectly:

craft()-&gt;on('commerce_lineItems.onPopulateLineItem', function($event)
{
    $lineItem = $event-&gt;params['lineItem'];
    $globalPrices = craft()-&gt;globals-&gt;getSetByHandle('defaultPrices');
    $itemPrice = $globalPrices-&gt;fontStylePrice;
    $lineItem-&gt;price = $itemPrice;