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: 9 additions & 1 deletion assets/css/admin/facebook-for-woocommerce-connection.css
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,14 @@
min-height: calc(100vh - 200px);
}

#facebook-commerce-iframe-enhanced {
width: 100%;
max-width: 1100px;
min-height: calc(100vh - 200px);
background: transparent;
border: none;
}

.woocommerce-embed-page #wpbody-content {
padding-bottom: 0;
}
}
9 changes: 8 additions & 1 deletion class-wc-facebookcommerce.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ class WC_Facebookcommerce extends WooCommerce\Facebook\Framework\Plugin {
/** @var WooCommerce\Facebook\Admin\Settings */
private $admin_settings;

/** @var WooCommerce\Facebook\Admin\Enhanced_Settings */
private $admin_enhanced_settings;

/** @var WooCommerce\Facebook\AJAX Ajax handler instance */
private $ajax;

Expand Down Expand Up @@ -234,7 +237,11 @@ public function init() {

// load admin handlers, before admin_init
if ( is_admin() ) {
$this->admin_settings = new WooCommerce\Facebook\Admin\Settings( $this->connection_handler->is_connected() );
if ($this->get_integration()->use_enhanced_onboarding()) {
$this->admin_enhanced_settings = new WooCommerce\Facebook\Admin\Enhanced_Settings( $this->connection_handler->is_connected() );
} else {
$this->admin_settings = new WooCommerce\Facebook\Admin\Settings( $this->connection_handler->is_connected() );
}
}
}
}
Expand Down
8 changes: 5 additions & 3 deletions includes/Admin/Abstract_Settings_Screen.php
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,11 @@ protected function is_current_screen_page() {
return false;
}
// assume we are on the Connection tab by default because the link under Marketing doesn't include the tab query arg
$connection_handler = facebook_for_woocommerce()->get_connection_handler();
$default_tab = $connection_handler->is_connected() ? 'advertise' : 'connection';
$tab = Helper::get_requested_value( 'tab', $default_tab );
$connection_handler = facebook_for_woocommerce()->get_connection_handler();
$use_enhanced_onboarding = facebook_for_woocommerce()->get_integration()->use_enhanced_onboarding();
$default_tab = $use_enhanced_onboarding ? 'shops' : ( $connection_handler->is_connected() ? 'advertise' : 'connection' );
$tab = Helper::get_requested_value( 'tab', $default_tab );

return ! empty( $tab ) && $tab === $this->get_id();
}

Expand Down
Loading