| @@ -216,8 +216,22 @@ | ||
| 216 | 216 | } |
| 217 | 217 | } |
| 218 | 218 | |
| 219 | 219 | /* |
| 220 | + * Determine whether WCPOS Pro is active. | |
| 221 | + * | |
| 222 | + * @return bool Whether WCPOS Pro is active. | |
| 223 | + */ | |
| 224 | +if ( ! \function_exists( 'wcpos_is_pro_active' ) ) { | |
| 225 | + /** | |
| 226 | + * Determine whether WCPOS Pro is active. | |
| 227 | + */ | |
| 228 | + function wcpos_is_pro_active(): bool { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound -- uses wcpos_ prefix. | |
| 229 | + return (bool) apply_filters( 'woocommerce_pos_is_pro_active', \defined( 'WCPOS\WooCommercePOSPro\VERSION' ) ); | |
| 230 | + } | |
| 231 | +} | |
| 232 | + | |
| 233 | +/* | |
| 220 | 234 | * Get the site UUID (Plugin State), generating and persisting it on first use. |
| 221 | 235 | * |
| 222 | 236 | * @return string Site UUID. |
| 223 | 237 | */ |