Automattic/o2

Undefined Function Error: wpcom_o2_is_enabled

Closed this issue · 2 comments

Just updated with some of the new pull requests in play (thanks to @ocean90 and @pento for the recent activity). Thought I would report an error appearing in my php logs.

Call to undefined function wpcom_o2_is_enabled() in .../wp-content/plugins/o2/inc/xposts.php on line 101

Source:

o2/inc/xposts.php

Lines 101 to 106 in 6e2b934

// Receiving blog must also be running o2 (to handle the xpost properly)
// @todo Obviously this is WPCOM only
if ( !wpcom_o2_is_enabled() || !wpcom_theme_supports_o2() ) {
restore_current_blog();
continue;
}

In 7349caf @pento added another wpcom_o2_is_enabled() call but it uses function_exists(). We should do the same for the others.

pento commented

Thanks for the bug report, @mrjarbenne! I'll get that fixed up shortly. :-)