wp_insert_post fails at return statement (nothing is returned to the caller, the error displayed is: The Link You Followed Has Expired)

there is a WooCommerce site where we try to add the Wholesale Pro plugin, which upon activation creates two pages (login, store). For this task it calls the wp_insert_post from a static method. The wp_insert_post does its stuff, and we even log every part of the wp_insert_post procedure to debug.log, comes down to return statement and then the WordPress fails with "The Link You Followed Has Expired" on the plugins.php screen. The return statement returns nothing to the caller static method, but the page/post is created in wp_posts table.

The plugin itself is proven to activate and work properly on another site.