Merge pull request #15452 from woocommerce/fix/15440
Add correct args to woocommerce_shipping_zone_method_deleted
This commit is contained in:
commit
2e6219f682
|
@ -420,8 +420,13 @@ class WC_Shipping_Zone extends WC_Legacy_Shipping_Zone {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->data_store->delete_method( $instance_id );
|
// Get method details.
|
||||||
do_action( 'woocommerce_shipping_zone_method_deleted', $instance_id, $this->get_id() );
|
$method = $this->data_store->get_method( $instance_id );
|
||||||
|
|
||||||
|
if ( $method ) {
|
||||||
|
$this->data_store->delete_method( $instance_id );
|
||||||
|
do_action( 'woocommerce_shipping_zone_method_deleted', $instance_id, $method->method_id, $this->get_id() );
|
||||||
|
}
|
||||||
|
|
||||||
WC_Cache_Helper::get_transient_version( 'shipping', true );
|
WC_Cache_Helper::get_transient_version( 'shipping', true );
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue