Hello,
You can fix it by applying patch # 643367
. To do this, go to Dashboard -> WoodMart -> Patcher, find the corresponding patch and click on the “Apply” button.
After this, add the following code snippet to the functions.php
file in the child theme, refresh any page and remove it
add_action(
'init',
function () {
$carts = get_posts(
array(
'post_type' => 'wd_abandoned_cart',
'posts_per_page' => -1,
)
);
foreach ( $carts as $cart ) {
$cart_id = $cart->ID;
$stored_cart = maybe_unserialize( get_post_meta( $cart_id, '_cart', true ) );
if ( 0 === $stored_cart->get_cart_contents_count() ) {
wp_delete_post( $cart_id );
}
}
}
);
Kind Regards