Remove disabling Update Cart button on WooCommerce cart page

/*
 * This will make Update Cart button always enabled, even if no changes were made in cart.
 */
function remove_disabling_update_cart_button_on_cart() {
	if ( is_cart() ) {
		echo "<script type='text/javascript'>
			jQuery(document).ready(function() {
				jQuery( '.shop_table.cart' ).closest( 'form' ).find( 'input[name=\"update_cart\"]' ).removeProp( 'disabled' );
			});
		</script>";
	}
}
// Add script to footer
add_action( 'wp_footer', 'remove_disabling_update_cart_button_on_cart', PHP_INT_MAX );

Check if post exists by slug in WordPress

/**
 * post_exists_by_slug.
 *
 * @return mixed boolean false if no post exists; post ID otherwise.
 */
function post_exists_by_slug( $post_slug ) {
	$args_posts = array(
		'post_type'      => 'post',
		'post_status'    => 'any',
		'name'           => $post_slug,
		'posts_per_page' => 1,
	);
	$loop_posts = new WP_Query( $args_posts );
	if ( ! $loop_posts->have_posts() ) {
		return false;
	} else {
		$loop_posts->the_post();
		return $loop_posts->post->ID;
	}
}

Add post content word count column to admin posts list in WordPress

add_filter( 'manage_edit-post_columns',        'add_words_column', PHP_INT_MAX );
add_action( 'manage_post_posts_custom_column', 'render_words_column', PHP_INT_MAX );
/**
 * add_words_column.
 */
function add_words_column( $columns ) {
	$columns['word_count'] = 'Words';
	return $columns;
}
/**
 * render_words_column.
 */
function render_words_column( $column ) {
	if ( 'word_count' != $column ) {
		return;
	}
	echo str_word_count( strip_tags( apply_filters( 'the_content', get_post_field( 'post_content', get_the_ID() ) ) ) );
}

Open external WooCommerce product in new window

// Single product page
add_action( 'woocommerce_before_add_to_cart_button', 'replace_external_with_custom_add_to_cart_on_single_start' );
add_action( 'woocommerce_after_add_to_cart_button',  'replace_external_with_custom_add_to_cart_on_single_end' );
function replace_external_with_custom_add_to_cart_on_single_start() {
	global $product;
	if ( $product->is_type( 'external' ) ) {
		ob_start();
	}
}
function replace_external_with_custom_add_to_cart_on_single_end() {
	global $product;
	if ( $product->is_type( 'external' ) ) {
		$button_html = ob_get_contents();
		ob_end_clean();
		echo str_replace( 'a href=', 'a target="_blank" href=', $button_html );
	}
}
// Archive (category) pages
add_filter( 'woocommerce_loop_add_to_cart_link', 'replace_external_with_custom_add_to_cart_in_loop' );
function replace_external_with_custom_add_to_cart_in_loop( $link_html ) {
	global $product;
	if ( $product->is_type( 'external' ) ) {
		$link_html = str_replace( 'a rel=', 'a target="_blank" rel=', $link_html );
	}
	return $link_html;
}