Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Declare HPOS as compatible #385

Merged
merged 3 commits into from
Jul 26, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions omise-woocommerce.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,26 @@ class Omise
*/
public function __construct()
{
add_action('before_woocommerce_init', [$this, 'enable_hpos']);
add_action('plugins_loaded', array($this, 'check_dependencies'));
add_action('woocommerce_init', array($this, 'init'));
do_action('omise_initiated');
add_action('admin_notices', [$this, 'embedded_form_notice']);
}

/**
* enable high performance order storage(HPOS) feature
*/
public function enable_hpos() {
ajzkk marked this conversation as resolved.
Show resolved Hide resolved
if (class_exists(\Automattic\WooCommerce\Utilities\FeaturesUtil::class)) {
\Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility(
'custom_order_tables',
__FILE__,
true
);
}
}

/**
* Notice for users informing about embedded form
*/
Expand Down
Loading