woocommerce_api_edit_product_attribute

woocommerce_api_edit_product_attribute

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: action

See hook in core

Displaying hooks found in version: woocommerce.8.9.3

do_action('woocommerce_api_edit_product_attribute') is found 2 times:

  • /includes/legacy/api/v2/class-wc-api-products.php line 2108
    2104
    2105
    2106
    2107
    2108
    2109
    2110
    2111
    2112
    2113
    2114
    if ( false === $update ) {
        throw new WC_API_Exception( 'woocommerce_api_cannot_edit_product_attribute', __( 'Could not edit the attribute', 'woocommerce' ), 400 );
    }
     
    do_action( 'woocommerce_api_edit_product_attribute', $id, $data );
     
    // Clear transients
    delete_transient( 'wc_attribute_taxonomies' );
    WC_Cache_Helper::invalidate_cache_group( 'woocommerce-attributes' );
     
    return $this->get_product_attribute( $id );
  • /includes/legacy/api/v3/class-wc-api-products.php line 2662
    2658
    2659
    2660
    2661
    2662
    2663
    2664
    2665
    2666
    2667
    if ( false === $update ) {
        throw new WC_API_Exception( 'woocommerce_api_cannot_edit_product_attribute', __( 'Could not edit the attribute', 'woocommerce' ), 400 );
    }
     
    do_action( 'woocommerce_api_edit_product_attribute', $id, $data );
     
    // Clear transients.
    wp_schedule_single_event( time(), 'woocommerce_flush_rewrite_rules' );
    delete_transient( 'wc_attribute_taxonomies' );
    WC_Cache_Helper::invalidate_cache_group( 'woocommerce-attributes' );