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§ion=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.
