• Hi everyone, This site of mine was running all this while suddenly this morning, it had reverted to the twentyfifteen theme. So looking through the admin, I noticed the old theme was broken. I re-uploaded the theme, and now I get the following errors:

    PHP Warning: in_array() expects parameter 2 to be array, string given

    PHP Warning: in_array() expects parameter 2 to be array, string given

    PHP Fatal error: Call to undefined function WC()

    The first error code:

    if ( in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ) {
    function trizzy_woocommerce_recent_products( $atts, $content ) {
        extract(shortcode_atts(array(
            'orderby'=> 'date',
            'order'=> 'DESC',
            'per_page'  => '12',
            'category'  => '',
            'ids' => '',
            ), $atts));
    
    global $woocommerce, $product;

    The third error code:

    <div class="cart-btn">
        <a href="#" class="button adc"><?php echo WC()->cart->get_cart_subtotal(); ?></a>
    </div>

    The second error is pretty similar to the first. So that should not be an issue to resolve.

    Thanks and Regards

  • The topic ‘WordPress/Woocommerce: Multiple PHP errors’ is closed to new replies.