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

Remove Facebook Info banner #2435

Draft
wants to merge 3 commits into
base: develop
Choose a base branch
from
Draft
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
56 changes: 0 additions & 56 deletions assets/css/facebook-infobanner.css

This file was deleted.

41 changes: 0 additions & 41 deletions facebook-commerce.php
Original file line number Diff line number Diff line change
Expand Up @@ -235,25 +235,6 @@ public function __construct( WC_Facebookcommerce $facebook_for_woocommerce ) {
include_once 'includes/fbutils.php';
}

// Display an info banner for eligible pixel and user.
if ( $this->get_external_merchant_settings_id()
&& $this->get_facebook_pixel_id()
&& $this->get_pixel_install_time() ) {
$should_query_tip =
WC_Facebookcommerce_Utils::check_time_cap(
get_option( 'fb_info_banner_last_query_time', '' ),
self::FB_TIP_QUERY
);
$last_tip_info = WC_Facebookcommerce_Utils::get_cached_best_tip();

if ( $should_query_tip || $last_tip_info ) {
if ( ! class_exists( 'WC_Facebookcommerce_Info_Banner' ) ) {
include_once 'includes/fbinfobanner.php';
}
WC_Facebookcommerce_Info_Banner::get_instance( $this->get_external_merchant_settings_id(), $should_query_tip );
}
}

if ( ! $this->get_pixel_install_time() && $this->get_facebook_pixel_id() ) {
$this->update_pixel_install_time( time() );
}
Expand Down Expand Up @@ -652,27 +633,6 @@ public function allow_full_batch_api_sync() {
* Load DIA specific JS Data
*/
public function load_assets() {
$ajax_data = [
'nonce' => wp_create_nonce( 'wc_facebook_infobanner_jsx' ),
];
// load banner assets
wp_enqueue_script(
'wc_facebook_infobanner_jsx',
$this->facebook_for_woocommerce->get_asset_build_dir_url() . '/admin/infobanner.js',
[],
\WC_Facebookcommerce::PLUGIN_VERSION
);
wp_localize_script( 'wc_facebook_infobanner_jsx', 'wc_facebook_infobanner_jsx', $ajax_data );
wp_enqueue_style(
'wc_facebook_infobanner_css',
plugins_url(
'/assets/css/facebook-infobanner.css',
__FILE__
),
[],
\WC_Facebookcommerce::PLUGIN_VERSION
);

if ( ! $this->facebook_for_woocommerce->is_plugin_settings() ) {
return;
}
Expand All @@ -690,7 +650,6 @@ public function load_assets() {
pixelId: '<?php echo $this->get_facebook_pixel_id() ? esc_js( $this->get_facebook_pixel_id() ) : ''; ?>',
advanced_matching_supported: true
},
diaSettingId: '<?php echo $this->get_external_merchant_settings_id() ? esc_js( $this->get_external_merchant_settings_id() ) : ''; ?>',
store: {
baseUrl: window.location.protocol + '//' + window.location.host,
baseCurrency:'<?php echo esc_js( WC_Admin_Settings::get_option( 'woocommerce_currency' ) ); ?>',
Expand Down
241 changes: 0 additions & 241 deletions includes/fbinfobanner.php

This file was deleted.

Loading