Woocommerce cart-checkout block | WordPress.org

[ad_1]

I am trying to update my custom payment gateway plugin to be compatible with woocommerce cart-block page but I keep getting this error
Critical Uncaught TypeError: array_merge(): Argument #2 must be of type array, null given in C:\xamppv8.2\htdocs\wordpress\wp-content\plugins\woocommerce\src\StoreApi\Legacy.php:67″

I have logged the arguments to the array_merge and both are valid arrays.

function wafi_plugin_action_links( $links ) {

    $settings_link = array(

‘settings’ => ‘<a href=”‘ . admin_url( ‘admin.php?page=wc-settings&tab=checkout&section=wafi’ ) . ‘” title=”‘ . __( ‘View Wafi WooCommerce Settings’, ‘wafi-payment-for-woocommerce’ ) . ‘”>’ . __( ‘Settings’, ‘wafi-payment-for-woocommerce’ ) . ‘</a>’,

    );

    return array_merge( $settings_link, $links );

}

This error occurs when I click on “place order” for a woocommerce cart-checkout block page.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer