Skip to content

Commit ba59534

Browse files
committed
feat: Added base Integration class
1 parent 2b0708d commit ba59534

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

src/Core/Integration.php

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?php //phpcs:disable Squiz.Commenting.FunctionComment.Missing
2+
3+
use XWC\Mixins\Settings_API_Methods;
4+
5+
/**
6+
* Base class for extended WooCommerce integrations.
7+
*/
8+
abstract class XWC_Integration extends WC_Integration {
9+
use Settings_API_Methods;
10+
11+
protected function get_meta_type(): string {
12+
return 'integration';
13+
}
14+
15+
protected function get_base_defaults(): array {
16+
return array(
17+
'id' => '',
18+
'method_description' => '',
19+
'method_title' => '',
20+
'plugin_id' => '',
21+
);
22+
}
23+
}

0 commit comments

Comments
 (0)