woocommerce_log_remove

woocommerce_log_remove

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

See hook in core

Displaying hooks found in version: woocommerce.8.7.0

do_action('woocommerce_log_remove') is found 1 times:

  • /includes/log-handlers/class-wc-log-handler-file.php line 264
    			if ( 0 === stripos( $file, realpath( trailingslashit( WC_LOG_DIR ) ) ) && 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.