Skip to content

Commit

Permalink
fix HPOS order preview
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaspijak committed Nov 14, 2023
1 parent 7f9900c commit d650d4e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Template/Init.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
*/

use BulkGate\{Plugin\Debug\Logger, Plugin\Debug\Requirements, Plugin\Eshop, Plugin\Settings\Settings, Plugin\Strict, Plugin\User\Sign, Plugin\Utils\JsonResponse, WooSms\Ajax\Authenticate, WooSms\Ajax\PluginSettingsChange, WooSms\Debug\Page, WooSms\DI\Factory, WooSms\Utils\Logo, WooSms\Utils\Meta};
use function method_exists, in_array;

class Init
{
Expand Down Expand Up @@ -41,7 +42,7 @@ public static function init(): void
{
if (in_array($post_type, ['shop_order', 'woocommerce_page_wc-orders'], true) && Factory::get()->getByClass(Settings::class)->load('static:application_token'))
{
add_meta_box('bulkgate_send_message', 'BulkGate SMS', fn ($post) => SendMessage::print(Factory::get(), wc_get_order($post->get_id()), []), $post_type, 'side', 'high');
add_meta_box('bulkgate_send_message', 'BulkGate SMS', fn ($post) => SendMessage::print(Factory::get(), wc_get_order(method_exists($post, 'get_id') ? $post->get_id() : $post->ID), []), $post_type, 'side', 'high');
}
});

Expand Down

0 comments on commit d650d4e

Please sign in to comment.