Improved the WC_Meta_Box_Webhook_Data:save() method

This commit is contained in:
Claudio Sanches 2014-12-17 09:29:43 -02:00
parent b8e842d2ee
commit 429c91708b
1 changed files with 2 additions and 4 deletions

View File

@ -167,12 +167,10 @@ class WC_Meta_Box_Webhook_Data {
$wpdb->update( $wpdb->posts, array( 'post_title' => $name ), array( 'ID' => $post_id ) );
// Status
$status = ! empty( $_POST['status'] ) ? wc_clean( $_POST['status'] ) : '';
$webhook->update_status( $status );
$webhook->update_status( $_POST['status'] );
// Delivery URL
$delivery_url = ! empty( $_POST['delivery_url'] ) ? $_POST['delivery_url'] : '';
$webhook->set_delivery_url( $delivery_url );
$webhook->set_delivery_url( $_POST['delivery_url'] );
// Secret
$secret = ! empty( $_POST['secret'] ) ? $_POST['secret'] : get_user_meta( get_current_user_id(), 'woocommerce_api_consumer_secret', true );