Comment out exception code - see #11715
This commit is contained in:
parent
709dec9ef1
commit
594bceedf2
|
@ -700,7 +700,7 @@ abstract class WC_Abstract_Order extends WC_Abstract_Legacy_Order {
|
||||||
*/
|
*/
|
||||||
public function set_currency( $value ) {
|
public function set_currency( $value ) {
|
||||||
if ( $value && ! in_array( $value, array_keys( get_woocommerce_currencies() ) ) ) {
|
if ( $value && ! in_array( $value, array_keys( get_woocommerce_currencies() ) ) ) {
|
||||||
$this->throw_exception( 'invalid_currency', 'Invalid currency code' );
|
//$this->throw_exception( 'invalid_currency', 'Invalid currency code' );
|
||||||
}
|
}
|
||||||
$this->_data['currency'] = $value;
|
$this->_data['currency'] = $value;
|
||||||
}
|
}
|
||||||
|
|
|
@ -128,7 +128,7 @@ class WC_Order_Item_Fee extends WC_Order_Item {
|
||||||
*/
|
*/
|
||||||
public function set_tax_class( $value ) {
|
public function set_tax_class( $value ) {
|
||||||
if ( $value && ! in_array( $value, WC_Tax::get_tax_classes() ) ) {
|
if ( $value && ! in_array( $value, WC_Tax::get_tax_classes() ) ) {
|
||||||
$this->throw_exception( __METHOD__, 'Invalid tax class' );
|
//$this->throw_exception( __METHOD__, 'Invalid tax class' );
|
||||||
}
|
}
|
||||||
$this->_data['tax_class'] = $value;
|
$this->_data['tax_class'] = $value;
|
||||||
}
|
}
|
||||||
|
|
|
@ -234,7 +234,7 @@ class WC_Order_Item_Product extends WC_Order_Item {
|
||||||
*/
|
*/
|
||||||
public function set_quantity( $value ) {
|
public function set_quantity( $value ) {
|
||||||
if ( 0 >= $value ) {
|
if ( 0 >= $value ) {
|
||||||
$this->throw_exception( __METHOD__, 'Quantity must be positive' );
|
//$this->throw_exception( __METHOD__, 'Quantity must be positive' );
|
||||||
}
|
}
|
||||||
$this->_data['quantity'] = wc_stock_amount( $value );
|
$this->_data['quantity'] = wc_stock_amount( $value );
|
||||||
}
|
}
|
||||||
|
@ -245,7 +245,7 @@ class WC_Order_Item_Product extends WC_Order_Item {
|
||||||
*/
|
*/
|
||||||
public function set_tax_class( $value ) {
|
public function set_tax_class( $value ) {
|
||||||
if ( $value && ! in_array( $value, WC_Tax::get_tax_classes() ) ) {
|
if ( $value && ! in_array( $value, WC_Tax::get_tax_classes() ) ) {
|
||||||
$this->throw_exception( __METHOD__, 'Invalid tax class' );
|
//$this->throw_exception( __METHOD__, 'Invalid tax class' );
|
||||||
}
|
}
|
||||||
$this->_data['tax_class'] = $value;
|
$this->_data['tax_class'] = $value;
|
||||||
}
|
}
|
||||||
|
@ -331,7 +331,7 @@ class WC_Order_Item_Product extends WC_Order_Item {
|
||||||
*/
|
*/
|
||||||
public function set_product( $product ) {
|
public function set_product( $product ) {
|
||||||
if ( ! is_a( $product, 'WC_Product' ) ) {
|
if ( ! is_a( $product, 'WC_Product' ) ) {
|
||||||
$this->throw_exception( __METHOD__, 'Invalid product' );
|
//$this->throw_exception( __METHOD__, 'Invalid product' );
|
||||||
}
|
}
|
||||||
$this->set_product_id( $product->get_id() );
|
$this->set_product_id( $product->get_id() );
|
||||||
$this->set_name( $product->get_title() );
|
$this->set_name( $product->get_title() );
|
||||||
|
|
Loading…
Reference in New Issue