Back to PhocacartShipping class

Method checkAndGetShippingMethod

public bool|array
checkAndGetShippingMethod
(mixed $id = 0, mixed $total = array())
Check current shipping method Shipping method must be selected
Parameters
  • \number $id
Returns
  • bool|array

Method checkAndGetShippingMethod - Source code

/*public function checkAndGetShippingMethodInsideCart($id, $total) {

		if ((int)$id > 0 && !empty($total)) {
			return $this->checkAndGetShippingMethods($id, 0, $total);
		}
		return false;

	}*/
/**
 * Check current shipping method
 * Shipping method must be selected
 * @param number $id
 * @return boolean|array
 */
public function checkAndGetShippingMethod($id = 0, $total = array())
{
    if ((int) $id > 0) {
        return $this->checkAndGetShippingMethods($id, 0, $total);
    }
    return false;
}