• We’re developing a new site with this plugin, and have WP_DEBUG turned on to expedite things…

    …which reveals the following notice:

    Undefined variable: visibility <b>…/wp-content/plugins/woocommerce-cart-tab/cart-tab.php</b> on line <b>174</b>

    Indeed, $visibility is undefined within the scope of the function “wcct_cart_button”

    The following edits to cart-tab.php will remove the error:

    Line 154, original – wcct_cart_button();
    Line 154, edited – wcct_cart_button( $visibility );

    Line 171, original – function wcct_cart_button() {
    Line 171, edited – function wcct_cart_button( $visibility = '' ) {

    We’re simply passing $visibility, which is defined within the woocommerce_cart_tab function, into the wc_cart_button function. With a default value of ”, anything other code calls this function should be able to proceed without any problems.

    This appears to solve the issue without introducing any other bugs or side effects. HTH.

    https://www.ads-software.com/plugins/woocommerce-cart-tab/

  • The topic ‘Proposed fix – bug in the addition of the class hidden/visible’ is closed to new replies.