woocommerce_update_options

woocommerce_update_options

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: action
See hook in action

See hook in core

Displaying hooks found in version: woocommerce.9.8.1

do_action('woocommerce_update_options') is found 8 times:

  • /includes/admin/class-wc-admin-settings.php line 92
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    // Trigger actions.
    do_action( 'woocommerce_settings_save_' . $current_tab );
    do_action( 'woocommerce_update_options_' . $current_tab );
    do_action( 'woocommerce_update_options' );
     
    self::add_message( __( 'Your settings have been saved.', 'woocommerce' ) );
    self::check_download_folder_protection();
     
    // Clear any unwanted data and flush rules.
    update_option( 'woocommerce_queue_flush_rewrite_rules', 'yes' );
  • /includes/class-wc-ajax.php line 3102
    3098
    3099
    3100
    3101
    3102
    3103
    3104
    3105
    3106
    3107
    3108
         * Completes the saving process for options.
         *
         * @since 7.8.0
         */
        do_action( 'woocommerce_update_options' );
        wp_send_json_success(
            array(
                'zones' => WC_Shipping_Zones::get_zones( 'json' ),
            )
        );
    }
  • /includes/class-wc-ajax.php line 3168
    3164
    3165
    3166
    3167
    3168
    3169
    3170
    3171
    3172
    3173
    3174
    * Completes the saving process for options.
     *
     * @since 7.8.0
     */
    do_action( 'woocommerce_update_options' );
     
    wp_send_json_success(
        array(
            'instance_id' => $instance_id,
            'zone_id'     => $zone->get_id(),
            'zone_name'   => $zone->get_zone_name(),
  • /includes/class-wc-ajax.php line 3227
    3223
    3224
    3225
    3226
    3227
    3228
    3229
    3230
    3231
    3232
    3233
    * Completes the saving process for options.
     *
     * @since 7.8.0
     */
    do_action( 'woocommerce_update_options' );
     
    wp_send_json_success(
        array(
            'instance_id' => $instance_id,
            'methods'     => $zone->get_shipping_methods( false, 'json' ),
        )
  • /includes/class-wc-ajax.php line 3395
    3391
    3392
    3393
    3394
    3395
    3396
    3397
    3398
    3399
    3400
    3401
    * Completes the saving process for options.
     *
     * @since 7.8.0
     */
    do_action( 'woocommerce_update_options' );
     
    wp_send_json_success(
        array(
            'zone_id'   => $zone->get_id(),
            'zone_name' => $zone->get_zone_name(),
            'methods'   => $zone->get_shipping_methods( false, 'json' ),
  • /includes/class-wc-ajax.php line 3443
    3439
    3440
    3441
    3442
    3443
    3444
    3445
    3446
    3447
    3448
    3449
    * Completes the saving process for options.
     *
     * @since 7.8.0
     */
    do_action( 'woocommerce_update_options' );
    $shipping_method->process_admin_options();
     
    WC_Cache_Helper::get_transient_version( 'shipping', true );
     
    wp_send_json_success(
        array(
  • /includes/class-wc-ajax.php line 3576
    3572
    3573
    3574
    3575
    3576
    3577
    3578
    3579
    3580
    3581
    3582
    * Completes the saving process for options.
     *
     * @since 7.8.0
     */
    do_action( 'woocommerce_update_options' );
    $wc_shipping = WC_Shipping::instance();
     
    wp_send_json_success(
        array(
            'shipping_classes' => $wc_shipping->get_shipping_classes(),
        )
  • /includes/class-wc-ajax.php line 3629
    3625
    3626
    3627
    3628
    3629
    3630
    3631
    3632
    3633
    3634
    3635
                do_action( 'woocommerce_update_option', $option );
                // Disable the gateway.
                $gateway->update_option( 'enabled', 'no' );
            }
            do_action( 'woocommerce_update_options' );
            wp_send_json_success( ! wc_string_to_bool( $enabled ) );
            wp_die();
        }
    }
     
    wp_send_json_error( 'invalid_gateway_id' );

See this hook used in plugins: