woocommerce_before_delete_product_variation

woocommerce_before_delete_product_variation

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

See hook in core

Displaying hooks found in version: woocommerce.9.5.1

do_action('woocommerce_before_delete_product_variation') is found 1 times:

  • /includes/data-stores/class-wc-product-variable-data-store-cpt.php line 674
     
    		if ( ! empty( $variation_ids ) ) {
    			foreach ( $variation_ids as $variation_id ) {
    				if ( $force_delete ) {
    					do_action( 'woocommerce_before_delete_product_variation', $variation_id );
    					wp_delete_post( $variation_id, true );
    					do_action( 'woocommerce_delete_product_variation', $variation_id );
    				} else {
    					wp_trash_post( $variation_id );
    					do_action( 'woocommerce_trash_product_variation', $variation_id );
    				}