Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
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
10 changes: 7 additions & 3 deletions includes/Admin/Enhanced_Settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,10 @@

use Automattic\WooCommerce\Admin\Features\Features as WooAdminFeatures;
use WooCommerce\Facebook\Admin\Settings_Screens;
use WooCommerce\Facebook\Admin\Settings_Screens\Shops;
use WooCommerce\Facebook\Framework\Helper;
use WooCommerce\Facebook\Framework\Plugin\Exception as PluginException;
use WooCommerce\Facebook\Admin\Settings_Screens\Whatsapp_Utility;
use WooCommerce\Facebook\RolloutSwitches;
use WooCommerce\Facebook\Framework\Logger;

defined( 'ABSPATH' ) || exit;

Expand Down Expand Up @@ -186,11 +185,16 @@ public function render() {
$current_tab = $this->get_current_tab();
$screen = $this->get_screen( $current_tab );

\WC_Facebookcommerce_Utils::log_to_meta(
Logger::log(
'User visited the Facebook for WooCommerce settings' . $current_tab . 'tab',
array(
'flow_name' => 'settings',
'flow_step' => $current_tab . '_tab_rendered',
),
array(
'should_send_log_to_meta' => true,
'should_save_log_in_woocommerce' => true,
'woocommerce_log_level' => \WC_Log_Levels::DEBUG,
)
);

Expand Down
23 changes: 20 additions & 3 deletions includes/Checkout.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@

defined( 'ABSPATH' ) || exit;

use WooCommerce\Facebook\Framework\Logger;

/**
* The checkout permalink.
*
Expand Down Expand Up @@ -109,7 +111,7 @@ public function load_checkout_permalink_template( $template ) {
$quantity
);

\WC_Facebookcommerce_Utils::log_to_meta(
Logger::log(
$error_message,
array(
'flow_name' => 'checkout',
Expand All @@ -119,6 +121,11 @@ public function load_checkout_permalink_template( $template ) {
'product_id' => $product_id,
'quantity' => $quantity,
],
),
array(
'should_send_log_to_meta' => true,
'should_save_log_in_woocommerce' => true,
'woocommerce_log_level' => \WC_Log_Levels::ERROR,
)
);
}
Expand All @@ -129,7 +136,7 @@ public function load_checkout_permalink_template( $template ) {
$quantity
);

\WC_Facebookcommerce_Utils::log_to_meta(
Logger::log(
$error_message,
array(
'flow_name' => 'checkout',
Expand All @@ -139,6 +146,11 @@ public function load_checkout_permalink_template( $template ) {
'product_id' => $product_id,
'quantity' => $quantity,
],
),
array(
'should_send_log_to_meta' => true,
'should_save_log_in_woocommerce' => true,
'woocommerce_log_level' => \WC_Log_Levels::ERROR,
)
);
}
Expand All @@ -156,7 +168,7 @@ public function load_checkout_permalink_template( $template ) {
$coupon_code_sanitized
);

\WC_Facebookcommerce_Utils::log_to_meta(
Logger::log(
$error_message,
array(
'flow_name' => 'checkout',
Expand All @@ -165,6 +177,11 @@ public function load_checkout_permalink_template( $template ) {
'coupon_param' => $coupon_code,
'coupon_code' => $coupon_code_sanitized,
],
),
array(
'should_send_log_to_meta' => true,
'should_save_log_in_woocommerce' => true,
'woocommerce_log_level' => \WC_Log_Levels::ERROR,
)
);
}
Expand Down