Files
piratepoet/mailpoet/tasks/phpstan/custom-stubs.php
Rodrigo Primo fa4c4d02d6 Update method to enable WooCommerce Custom Orders Tables
The latest version development build of WooCommerce contains a change
that modified the method that should be called to enable Woo Custom
Orders Tables (see this Woo PR for more information:
https://github.com/woocommerce/woocommerce/pull/34727. This commit
update the plugin that we use in the acceptance and integration tests to
reflect this change.

[MAILPOET-4691]
2022-10-04 09:26:11 +02:00

39 lines
1.1 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\DataSynchronizer::class)) {
class DataSynchronizer {
function create_database_tables() {}
}
}
}
namespace Automattic\WooCommerce\Internal\Features {
if (!class_exists(\Automattic\WooCommerce\Internal\Features\FeaturesController::class)) {
class FeaturesController {
function change_feature_enable(string $feature_id, bool $enable) {}
}
}
}