1) chosano.co.uk – you do not have the code added to the child theme functions.php file. You need:
/**
* Track recently viewed products and set cookie.
*
* @since Neighborhood 3.4.32
* @link https://github.com/woocommerce/woocommerce/issues/9724#issuecomment-160618200
*/
if ( !function_exists('sf_custom_track_product_view') ) {
function sf_custom_track_product_view() {
if ( ! is_singular( 'product' ) ) {
return;
}
global $post;
if ( empty( $_COOKIE['woocommerce_recently_viewed'] ) )
$viewed_products = array();
else
$viewed_products = (array) explode( '|', $_COOKIE['woocommerce_recently_viewed'] );
if ( ! in_array( $post->ID, $viewed_products ) ) {
$viewed_products[] = $post->ID;
}
if ( sizeof( $viewed_products ) > 15 ) {
array_shift( $viewed_products );
}
// Store for session only
wc_setcookie( 'woocommerce_recently_viewed', implode( '|', $viewed_products ) );
}
add_action( 'template_redirect', 'sf_custom_track_product_view', 20 );
}
2) I cannot login to wp-admin
: Have you changed the URL?