Files
piratepoet/mailpoet/tasks/phpstan/custom-stubs.php
Rostislav Wolny b371c631c4 Add helper mu-plugin for adding COT in tests
When plugin is active COT is enabled. The plugin also adds WP CLI command
for creating custom order tables so that we don't have to do it via admin UI.
[MAILPOET-4572]
2022-09-19 11:38:03 -03:00

37 lines
1.0 KiB
PHP

<?php
// phpcs:ignoreFile - This file contains stubs for 3rd party functions and classes that might break our PHPCS rules
namespace {
if (!function_exists('members_get_cap_group')) {
function members_get_cap_group($name) {
}
}
if (!class_exists(\WC_Subscription::class)) {
class WC_Subscription extends WC_Product {
}
}
if (!function_exists('wcs_create_subscription')) {
function wcs_create_subscription($args) {
}
}
}
// Temporary stubs for Woo Custom Tables.
// We can remove them after the functionality is officially released and added into php-stubs/woocommerce-stubs
namespace Automattic\WooCommerce\Internal\DataStores\Orders {
if (!class_exists(\Automattic\WooCommerce\Internal\DataStores\Orders\CustomOrdersTableController::class)) {
class CustomOrdersTableController {
function show_feature() {}
}
}
if (!class_exists(\Automattic\WooCommerce\Internal\DataStores\Orders\DataSynchronizer::class)) {
class DataSynchronizer {
function create_database_tables() {}
}
}
}