PluginProbe
StoreEngine — Complete eCommerce Solution with Memberships, Licensing, Affiliates & More / 2.2.0
StoreEngine — Complete eCommerce Solution with Memberships, Licensing, Affiliates & More v2.2.0
2.3.0 2.2.0 2.1.1 2.1.0 2.0.0 1.10.0 1.9.1 1.9.0 1.2.1 1.2.2 1.3.0 1.3.1 1.3.2 1.3.3 1.4.0 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 1.5.5 1.5.6 1.5.7 1.5.8 1.6.0 All 59 releases
storeengine / includes / interfaces / addon-interface.php

addon-interface.php in StoreEngine — Complete eCommerce Solution with Memberships, Licensing, Affiliates & More 2.2.0, at includes/interfaces/addon-interface.php

74 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Addon Interface.
4 *
5 * @version 1.0.0
6 */
7
8 namespace StoreEngine\Interfaces;
9
10 if ( ! defined( 'ABSPATH' ) ) {
11 exit;
12 }
13
14 interface AddonInterface {
15
16 /**
17 * Initialize singleton addon.
18 *
19 * @return AddonInterface
20 */
21 public static function init();
22
23 /**
24 * Define constants.
25 * Developers are encourage to use Class Constants
26 *
27 * @return void
28 */
29 public function define_constants();
30
31 /**
32 * Loads the addon.
33 *
34 * @return void
35 */
36 public function init_addon();
37
38 /**
39 * Trigger once during addon activation.
40 *
41 * @return void
42 */
43 public function addon_activation_hook();
44
45 /**
46 * Trigger once during addon deactivation.
47 *
48 * @return void
49 */
50 public function addon_deactivation_hook();
51
52 /**
53 * Current schema version of the addon's own tables.
54 *
55 * Return a version string (e.g. a STOREENGINE_<ADDON>_DB_VERSION constant).
56 * Bump it whenever the addon's schema files change so the central manager
57 * (Addons::sync_addon_schemas) reruns install_tables(). Return an empty
58 * string when the addon has no tables of its own.
59 *
60 * @return string
61 */
62 public function get_db_version(): string;
63
64 /**
65 * (Re)create the addon's tables via dbDelta.
66 *
67 * Called by the central schema manager when get_db_version() differs from
68 * the stored value. Must be idempotent.
69 *
70 * @return void
71 */
72 public function install_tables(): void;
73 }
74