woocommerce_log_remove

woocommerce_log_remove

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

See hook in core

Displaying hooks found in version: woocommerce.9.5.1

do_action('woocommerce_log_remove') is found 1 times:

  • /includes/log-handlers/class-wc-log-handler-file.php line 266
    			if ( 0 === stripos( $file, realpath( trailingslashit( $log_directory ) ) ) && is_file( $file ) && is_writable( $file ) ) { // phpcs:ignore WordPress.VIP.FileSystemWritesDisallow.file_ops_is_writable
    				$this->close( $file ); // Close first to be certain no processes keep it alive after it is unlinked.
    				$removed = unlink( $file ); // phpcs:ignore WordPress.VIP.FileSystemWritesDisallow.file_ops_unlink
    			}
    			do_action( 'woocommerce_log_remove', $handle, $removed );
    		}
    		return $removed;
    	}
    
    	/**
    	 * Check if log file should be rotated.