' . esc_html__( 'Advanced Custom Order Status for WooCommerce', 'advanced-custom-order-status-for-woocommerce' ) . '',
'' . esc_html__( 'WooCommerce', 'advanced-custom-order-status-for-woocommerce' ) . ''
);
printf( '
', wp_kses_post( $message ) );
}
/**
* Declare compatibility with WooCommerce HPOS
*
* @return void
*/
public static function declare_hpos_compatibility() {
if ( class_exists( FeaturesUtil::class ) ) {
FeaturesUtil::declare_compatibility( 'advanced-custom-order-status-for-woocommerce', SPCOS_ORDER_STATUS_FILE, true );
}
}
/**
* Setting page link from plugin page.
*
* @param array $links
* @return array
*/
public static function setting_link_next_plugin_activation( $links ) {
$links[] = 'Settings';
if( Utils::is_active() ) {
$links[] = 'Email Settings (Pro)';
$links[] = 'Get Pro';
}
return $links;
}
/**
* Get all order statuses data
*
* @return WP_Post[]|int[]
*/
public static function get_order_attributes() {
$order_attributes = get_posts(array(
'post_type' => 'wc_order_status',
'post_status' => 'publish',
'posts_per_page' => -1,
));
return $order_attributes;
}
/**
* Get specific order statuses data
*
* @return WP_Post[]|int[]
*/
public static function get_order_attribute($meta_key) {
$order_attribute = get_posts(array(
'post_type' => 'wc_order_status',
'post_status' => 'publish',
'posts_per_page' => -1,
'meta_query' => array(
array(
'key' => $meta_key,
'value' => '',
'compare' => '!='
),
),
));
return $order_attribute;
}
/**
* Deactivate the version lower than 2.0.0 of the Order Status Pro plugin
*
* @return void
*/
public static function deactivate_order_status_pro() {
if( self::get_pro_plugin_version() < '2.0.0' ) {
deactivate_plugins( self::get_pro_plugin_path(), true );
}
}
/**
* Disable activate link until the user updates the plugin to version 2.0.0 or later
*
* @return void
*/
public static function disable_order_status_active_link() {
if( self::get_pro_plugin_version() < '2.0.0' ) {
?>
"Advanced Custom Order Status Pro for WooCommerce", which limit functionality. Please update to the latest version from your account at %s to access all features.', 'advanced-custom-order-status-for-woocommerce' ),
'storeplugin.net'
); ?>
There is a new version of Advanced Custom Order Status Pro for WooCommerce. View version 2.0.0 details Automatic update is unavailable for this plugin
| ';
}
}
}