Support » Plugins » [Plugin: WooCommerce] woocommerce_update_option_X deprecated

  • Hi,

    I’m one of the author of the envoimoinscher plugin.

    We have been managing our plugin configuration using settings classes extended from WooCommerce WC_Settings_Page. It works fine but when saving this message is displayed:
    Notice: The woocommerce_update_option_X action est déprécié depuis la version 2.4.0! Utilisez woocommerce_admin_settings_sanitize_option filter à la place. in C:\wamp\www\wordpress431\wp-includes\functions.php on line 3406

    It seems that the message is coming from the save function of the original WooCommerce class which uses the woocommerce_update_option_X hook.

    We are concerned that at one point WooCommerce decides that this function should no longer be supported. Should we stop extending the WC_Settings_Page class for our settings? Or is it just something WooCommerce developers have yet to fix?

    Thanks for your insights,


Viewing 2 replies - 1 through 2 (of 2 total)
  • Hello Arnaud.

    I had the same problem with my plugin. I believe I have nothing to change in my code (my plugin is very simple) since the message came from WooCommerce class.

    I believe in future release the WooCommerce team will change this into the core, I posted a request for this in the WooCommerce website, no answer so far… But we are now in the last week of 2016 so I can understand the delay.


    Hello ,

    I had the same problem with my plugin

    // define the woocommerce_admin_settings_sanitize_option callback
    function filter_woocommerce_admin_settings_sanitize_option( $value, $option, $raw_value ) {
    // make filter magic happen here…
    return $value;

    // add the filter
    add_filter( ‘woocommerce_admin_settings_sanitize_option’, ‘filter_woocommerce_admin_settings_sanitize_option’, 10, 3 );

    instead of

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: WooCommerce] woocommerce_update_option_X deprecated’ is closed to new replies.