plugin updates

This commit is contained in:
Tony Volpe
2024-06-17 15:33:26 -04:00
parent 3751a5a1a6
commit e4e274a9a7
2674 changed files with 0 additions and 507851 deletions

View File

@@ -1,109 +0,0 @@
<?php
/**
* The admin-facing file for setting up connection with HubSpot.
*
* @link https://makewebbetter.com/
* @since 1.0.0
*
* @package makewebbetter-hubspot-for-woocommerce
* @subpackage makewebbetter-hubspot-for-woocommerce/admin/templates/setup
*/
$hubspot_url = Hubwoo::hubwoo_get_auth_url();
if ( 'yes' == get_option( 'hubwoo_connection_complete', 'no' ) ) {
$connect['will_connect'] = 'none';
$connect['did_connected'] = 'block';
} else {
$connect['will_connect'] = 'block';
$connect['did_connected'] = 'none';
}
if ( 'yes' == get_option( 'hubwoo_connection_issue', 'no' ) ) {
$notice = esc_html( 'Failed to connect to HubSpot, Try to reconnect or please contact us!', 'makewebbetter-hubspot-for-woocommerce' );
global $hubwoo;
$hubwoo->hubwoo_notice( $notice, 'hubwoo-notice' );
}
?>
<div class="mwb-heb-welcome" style="display: <?php echo esc_attr( $connect['will_connect'] ); ?>";>
<div class="hubwoo-box">
<div class="mwb-heb-wlcm__title">
<h2>
<?php esc_html_e( 'Getting started with HubSpot and WooCommerce', 'makewebbetter-hubspot-for-woocommerce' ); ?>
</h2>
</div>
<div class="mwb-heb-wlcm__content">
<div class="hubwoo-content__para">
<p>
<?php
esc_html_e( 'With this WooCommerce HubSpot integration, you can automatically sync all your WooCommerce contacts and customers with HubSpots CRM and marketing platform.', 'makewebbetter-hubspot-for-woocommerce' );
?>
</p>
<p>
<?php
esc_html_e( 'Once you set up this integration, you will be able to:', 'makewebbetter-hubspot-for-woocommerce' );
?>
<ul class="connect-list">
<li><?php esc_html_e( 'See every action each contact has taken including their page views, past orders, abandoned carts, and more — in HubSpot CRMs tidy timeline view', 'makewebbetter-hubspot-for-woocommerce' ); ?></li>
<li><?php esc_html_e( 'Segment contacts and customers into lists based on their previous interactions with your store', 'makewebbetter-hubspot-for-woocommerce' ); ?></li>
<li><?php esc_html_e( 'Easily create and send beautiful, responsive emails to drive sales', 'makewebbetter-hubspot-for-woocommerce' ); ?></li>
<li><?php esc_html_e( 'Measure your stores performance with custom reports and dashboards', 'makewebbetter-hubspot-for-woocommerce' ); ?></li>
</ul>
</p>
</div>
<p>
<?php esc_html_e( 'To get started, connect your HubSpot account. If you dont have a HubSpot account, create one then return to this window to connect it.', 'makewebbetter-hubspot-for-woocommerce' ); ?>
</p>
<div class="mwb-heb-wlcm__btn-wrap">
<a id="hubwoo-initiate-oauth" href="<?php echo esc_url( $hubspot_url ); ?>" class="hubwoo-btn--primary"><?php esc_html_e( 'Connect your Account', 'makewebbetter-hubspot-for-woocommerce' ); ?></a>
<a href="https://hubspot.sjv.io/kjBZ4x" target="_blank" class="hubwoo-btn--primary hubwoo-btn--secondary"><?php esc_html_e( 'Create a free HubSpot Account', 'makewebbetter-hubspot-for-woocommerce' ); ?></a>
</div>
</div>
</div>
</div>
<div class="acc-connected mwb-heb-welcome" style="display: <?php echo esc_attr( $connect['did_connected'] ); ?>";>
<div class="hubwoo-box">
<div class="mwb-heb-wlcm__title">
<h2>
<?php esc_html_e( 'Congratulation your account is now connected.', 'makewebbetter-hubspot-for-woocommerce' ); ?>
</h2>
</div>
<div class="mwb-heb-wlcm__content">
<div class="hubwoo-content__para">
<?php
$connected_portal_id = get_option( 'hubwoo_pro_hubspot_id', '' );
if ( ! empty( $connected_portal_id ) ) {
?>
<p>
<?php esc_html_e( 'Connected Portal ID : ', 'makewebbetter-hubspot-for-woocommerce' ); ?><strong><?php echo esc_html( $connected_portal_id ); ?><strong>
</p>
<?php
}
?>
<p>
<?php
esc_html_e( 'Switch to Another Account -', 'makewebbetter-hubspot-for-woocommerce' );
?>
<span class="changeAccount"><a class="hubwoo-manage-account" href="javascript:;" data-type="change-account" style="text-decoration: none; margin-left: 5px;"><?php esc_html_e( 'Click Here', 'makewebbetter-hubspot-for-woocommerce' ); ?></a></span>
</p>
</div>
<div class="mwb-heb-wlcm__btn-wrap">
<a href="javascript:;" class="hubwoo-btn--primary hubwoo_manage_screen" data-process="moveToGrpPr">
<?php esc_html_e( 'Continue', 'makewebbetter-hubspot-for-woocommerce' ); ?></a>
</div>
</div>
</div>
</div>
<?php
if ( 'no' == get_option( 'hubwoo_clear_previous_options', 'no' ) ) {
global $hubwoo;
$hubwoo->hubwoo_switch_account( false );
}
?>

View File

@@ -1,264 +0,0 @@
<?php
/**
* The admin-facing file for groups and properties setup.
*
* @link https://makewebbetter.com/
* @since 1.0.0
*
* @package makewebbetter-hubspot-for-woocommerce
* @subpackage makewebbetter-hubspot-for-woocommerce/admin/templates/setup
*/
global $hubwoo;
$hubwoo_groups = HubWooContactProperties::get_instance()->_get( 'groups' );
$final_groups = $hubwoo->hubwoo_get_final_groups();
$hubwoo_required_groups = $hubwoo->hubwoo_workflows_and_list_groups();
$hubwoo_required_props = $hubwoo->hubwoo_workflows_and_list_properties();
$final_properties = array_map(
function( $property ) {
return str_replace( "'", '', $property );
},
get_option( 'hubwoo-properties-created', array() )
);
$field_setup = $hubwoo->is_field_setup_completed();
if ( 1 == get_option( 'hubwoo_fields_setup_completed', 0 ) ) {
$cta['will_create'] = 'none';
$cta['did_created'] = 'inline-block';
$cta['gen_text'] = 'none';
} else {
$cta['will_create'] = 'inline-block';
$cta['did_created'] = 'none';
$cta['gen_text'] = 'block';
}
?>
<div class="mwb-heb-welcome hubwoo-wrap--groups">
<div class="hubwoo-box">
<div class="mwb-heb-wlcm__title">
<h2 class="grp-pr-heading">
<?php esc_html_e( 'Set up groups & properties in HubSpot', 'makewebbetter-hubspot-for-woocommerce' ); ?>
</h2>
</div>
<div class="mwb-heb-wlcm__content">
<div class="hubwoo-content__para">
<p>
<?php
esc_html_e( 'In order to view your WooCommerce data correctly in HubSpot, you need to set up groups and properties in your HubSpot account.', 'makewebbetter-hubspot-for-woocommerce' );
?>
</p>
<p>
<?php esc_html_e( 'Once you set up groups and properties, you can easily see the following information about your contacts and customers:', 'makewebbetter-hubspot-for-woocommerce' ); ?>
</p>
<ul class="grp-pr-list">
<li><?php esc_html_e( 'Order information', 'makewebbetter-hubspot-for-woocommerce' ); ?></li>
<li><?php esc_html_e( 'Previous purchases', 'makewebbetter-hubspot-for-woocommerce' ); ?></li>
<li><?php esc_html_e( 'Abandoned cart details', 'makewebbetter-hubspot-for-woocommerce' ); ?></li>
<li><?php esc_html_e( 'And more', 'makewebbetter-hubspot-for-woocommerce' ); ?></li>
</ul>
</div>
<div class="mwb-heb-wlcm__btn-wrap hubwoo-btn-list">
<a href="javascript:void;" id="hubwoo_create_group_prop_setup" class="hubwoo-btn--primary hubwoo-btn-data" data-action="group_setup" style="display: <?php echo esc_attr( $cta['will_create'] ); ?>"><?php esc_html_e( 'Create Groups & Properties ', 'makewebbetter-hubspot-for-woocommerce' ); ?></a>
<a href="javascript:void;" id="hubwoo-manage-setup" class="hubwoo-btn--primary hubwoo-btn-data" data-action="group_manage_setup" style="display: <?php echo esc_attr( $cta['did_created'] ); ?>"><?php esc_html_e( 'View Created Properties and Groups ', 'makewebbetter-hubspot-for-woocommerce' ); ?></a>
</div>
<div class="hubwoo-sub-content">
<div class="hubwoo-group__progress" style="display: none;">
<p>
<strong><?php esc_html_e( 'Group and property creation is in progress. This should only take a few moments. Thanks for your patience!', 'makewebbetter-hubspot-for-woocommerce' ); ?></strong>
</p>
<div class="hubwoo-progress">
<div class="hubwoo-progress-bar" role="progressbar" style="width:0"></div>
</div>
</div>
<div class="hubwoo-group__manage">
<div class="hubwoo_groups_container">
<?php if ( ! $field_setup ) { ?>
<div class="hubwoo-group-desc" style="display: none;">
<p>
<?php
esc_html_e(
'Select the Groups and Properties that you need on HubSpot.<br>
Click on a Group to Select/De-Select its Group Properties.',
'makewebbetter-hubspot-for-woocommerce'
);
?>
</p>
</div>
<form action="" method="post" id="hub-gr-props-form">
<div class="hubwoo-group-wrap__glist">
<div class="mwb-woo__accordian-main-wrapper" id="mwb-woo__accordian-main-wrapper">
<?php
if ( count( $hubwoo_groups ) ) {
foreach ( $hubwoo_groups as $key => $single_group ) {
?>
<div class="mwb-woo__accordion-wrapper">
<div class="mwb__accordian-heading-wrap">
<?php $group_required = in_array( $single_group['name'], $hubwoo_required_groups ) ? 'yes' : 'no'; ?>
<?php
$check_gr_class = 'mwb-hub-custom-checkbox';
if ( 'yes' == $group_required ) {
$check_gr_class .= ' hub-req-checkbox';
}
?>
<label class="<?php echo esc_attr( $check_gr_class ); ?>">
<input checked="checked" name="selectedGroups[]" type="checkbox" class="hub-group" value="<?php echo esc_html( $single_group['name'] ); ?>" data-group="<?php echo esc_attr( $single_group['name'] ); ?>" data-req="<?php echo esc_attr( $group_required ); ?>">
<?php if ( 'yes' == $group_required ) { ?>
<span class="hub-woo__checkmark"><?php esc_html_e( 'Required Group for Lists & Workflows', 'makewebbetter-hubspot-for-woocommerce' ); ?></span>
<?php } ?>
</label>
<a class="mwb-woo__accordian-heading <?php echo esc_attr( $single_group['name'] ); ?>" data-name="<?php echo esc_attr( $single_group['name'] ); ?>" href="javascript:void;"><?php echo esc_html( $single_group['label'] ); ?></a>
<i id="fa-drag-<?php echo esc_attr( $single_group['name'] ); ?>" class=" fa fa-plus grToCreate"></i>
</div>
<div class="mwb-woo__accordion-content" id="<?php echo esc_attr( $single_group['name'] ); ?>" style="display: none;">
<ul class="mwb-woo__custom-prop">
<?php $hubwoo_groups_properties = HubWooContactProperties::get_instance()->_get( 'properties', '', true ); ?>
<?php
foreach ( $hubwoo_groups_properties as $group => $hubwoo_properties ) {
if ( $group == $single_group['name'] ) {
if ( count( $hubwoo_properties ) ) {
foreach ( $hubwoo_properties as $single_property ) {
$prop_required = in_array( $single_property['name'], $hubwoo_required_props ) ? 'yes' : 'no';
$check_pr_class = 'mwb-hub-custom-checkbox';
if ( 'yes' == $prop_required ) {
$check_pr_class .= ' hub-req-checkbox';
}
?>
<li class="mwb-woo__custom">
<label class="<?php echo esc_attr( $check_pr_class ); ?>">
<input checked="checked" name="selectedProps[]" data-req="<?php echo esc_attr( $prop_required ); ?>" value="<?php echo esc_attr( $single_property['name'] ); ?>" type="checkbox" class="hub-prop">
<?php if ( 'yes' == $prop_required ) { ?>
<span class="hub-woo__checkmark"><?php esc_html_e( 'Required Property for Lists & Workflows', 'makewebbetter-hubspot-for-woocommerce' ); ?></span>
<?php } ?>
</label>
<div>
<?php echo esc_html( $single_property['label'] ); ?>
</div>
</li>
<?php
}
}
}
}
?>
</ul>
</div>
</div>
<?php
}
}
?>
</div>
</div>
<div class="hubwoo-full-wdth clearfix">
<button type="submit" class="hubwoo-form-wizard-setup-btn hubwoo__btn"><?php esc_html_e( 'Create Now', 'makewebbetter-hubspot-for-woocommerce' ); ?></button>
</div>
</form>
<?php } ?>
<?php if ( $field_setup ) { ?>
<div class="hubwoo-group-wrap__glist">
<span>
<?php esc_html_e( 'All of the created Groups and Properties are below.', 'makewebbetter-hubspot-for-woocommerce' ); ?>
</span>
<div class="mwb-woo__accordian-main-wrapper" id="mwb-woo__accordian-main-wrapper">
<?php
if ( count( $final_groups ) ) {
foreach ( $final_groups as $single_group ) {
?>
<div class="mwb-woo__accordion-wrapper">
<div class="mwb__accordian-heading-wrap">
<?php
if ( 'created' == $single_group['status'] ) {
$anc_class = 'gr_created';
?>
<i id="<?php echo esc_attr( 'fa-' . $single_group['detail']['name'] ); ?>" class="fa fa-chevron-right hubwoo-font-icon"></i>
<a data-name="<?php echo esc_attr( $single_group['detail']['name'], 'makewebbetter-hubspot-for-woocommerce' ); ?>" class="mwb-woo__accordian-heading <?php echo esc_attr( $single_group['detail']['name'] ); ?> <?php echo esc_attr( $anc_class ); ?>" href="javascript:void;"><?php echo esc_html( $single_group['detail']['label'] ); ?></a>
<?php
} else {
$anc_class = 'gr_uncreated';
?>
<i id="<?php echo esc_attr( 'fa--' . $single_group['detail']['name'] ); ?>" class="fa fa-chevron-right hubwoo-font-icon"></i>
<a class="mwb-woo__accordian-heading <?php echo esc_attr( $single_group['detail']['name'] ); ?> <?php echo esc_attr( $anc_class ); ?>" href="javascript:void;"><?php echo esc_html( $single_group['detail']['label'] ); ?></a>
<?php
}
?>
<?php
$acc_class = 'mwb-woo__accordion-content';
if ( 'created' == $single_group['status'] ) {
?>
<span class="grSuccess"><?php esc_html_e( 'Created', 'makewebbetter-hubspot-for-woocommerce' ); ?></span>
<?php
} else {
$acc_class .= '-disable';
?>
<span data-name="<?php echo esc_attr( $single_group['detail']['name'] ); ?>" class="hubwoo-create-single-group grCreateNew hubwoo-cr-btn hubwoo-crd-btn grSuccess"><?php esc_html_e( 'Create', 'makewebbetter-hubspot-for-woocommerce' ); ?></span>
<?php
}
?>
</div>
<div class="<?php echo esc_attr( $acc_class ); ?>" id="<?php echo esc_attr( $single_group['detail']['name'] ); ?>" style="display: none;">
<ul class="mwb-woo__custom-prop">
<?php $hubwoo_groups_properties = HubWooContactProperties::get_instance()->_get( 'properties', '', true ); ?>
<?php
foreach ( $hubwoo_groups_properties as $group => $hubwoo_properties ) {
if ( $group == $single_group['detail']['name'] ) {
if ( count( $hubwoo_properties ) ) {
foreach ( $hubwoo_properties as $single_property ) {
?>
<li class="mwb-woo__custom">
<?php
if ( in_array( $single_property['name'], $final_properties ) ) {
?>
<label class="hub-pr-created">
<span class=""></span>
<i class="fa fa-check"></i>
</label>
<?php
} else {
?>
<label class="hub-pr-create">
<span data-group ="<?php echo esc_attr( $single_group['detail']['name'] ); ?>" data-name="<?php echo esc_attr( $single_property['name'] ); ?>" class="prCreateNew hubwoo-create-single-field">
<i class="fa fa-plus pr-<?php echo esc_attr( $single_property['name'] ); ?>" aria-hidden="true"></i>
</label>
<?php
}
?>
<div>
<?php echo esc_html( $single_property['label'] ); ?>
</div>
</li>
<?php
}
}
}
}
?>
</ul>
</div>
</div>
<?php
}
}
?>
</div>
</div>
<?php } ?>
</div>
</div>
</div>
</div>
</div>
</div>

View File

@@ -1,175 +0,0 @@
<?php
/**
* The admin-facing file for list setup.
*
* @link https://makewebbetter.com/
* @since 1.0.0
*
* @package makewebbetter-hubspot-for-woocommerce
* @subpackage makewebbetter-hubspot-for-woocommerce/admin/templates/setup
*/
global $hubwoo;
$hubwoo->is_automation_enabled();
$list_setup = $hubwoo->is_list_setup_completed();
$hubwoo_lists = $hubwoo->hubwoo_get_final_lists();
$hubwoo_lists_desc = $hubwoo->get_lists_description();
$dynamic_lists = HubWooConnectionMananager::get_instance()->get_dynamic_lists();
if ( 1 == get_option( 'hubwoo_pro_lists_setup_completed', 0 ) ) {
$cta['create'] = 'none';
$cta['created'] = 'inline-block';
$cta['gen-text'] = 'none';
} else {
$cta['create'] = 'inline-block';
$cta['created'] = 'none';
$cta['gen-text'] = 'block';
}
?>
<div id="hubwoo-lists-setup" class="mwb-heb-welcome hubwoo-wrap--list">
<div class="hubwoo_pop_up_wrap" style="display: none">
<div class="pop_up_sub_wrap">
<div class="hubwoo_pop_up_wrap--content">
<div class="hubwoo_pop_up_wrap--inner-content">
<h2>
<?php esc_html_e( 'Create more dynamic / active lists', 'makewebbetter-hubspot-for-woocommerce' ); ?>
</h2>
<p style="text-align: center;font-size: 17px;">
<?php esc_html_e( 'You have reached maximum limit of Dynamic / Active Lists creation as per your CRM plan.', 'makewebbetter-hubspot-for-woocommerce' ); ?>
</p>
<div class="button_wrap">
<a href="https://hubspot.sjv.io/kjBZ4x" target="_blank" class="upgrade_hubspot_plan"><?php esc_html_e( 'Upgrade plan', 'makewebbetter-hubspot-for-woocommerce' ); ?></a>
<a href="javascript:void(0);" class = "hubwoo_manage_screen" data-process="skip-list-creation"><?php esc_html_e( 'Skip this step', 'makewebbetter-hubspot-for-woocommerce' ); ?></a>
</div>
</div>
</div>
<div class="hubwoo_pop_up_wrap--image">
<div class="hubwoo_pop_up_wrap--image--inner-content">
<h2>
<?php esc_html_e( 'Connect with MakeWebBetter to learn more about HubSpots plans', 'makewebbetter-hubspot-for-woocommerce' ); ?>
</h2>
<p>
<?php esc_html_e( 'MakeWebBetter is a HubSpot Elite Solutions Partner. Schedule a meeting with our experts to learn more about HubSpot.', 'makewebbetter-hubspot-for-woocommerce' ); ?>
</p>
<a href="https://meetings.hubspot.com/makewebbetter/free-hubspot-consultation" target="_blank" ><?php esc_html_e( 'Schedule meeting', 'makewebbetter-hubspot-for-woocommerce' ); ?></a>
</div>
</div>
</div>
</div>
<div class="hubwoo-box">
<div class="mwb-heb-wlcm__title">
<h2 class="list-setup-heading">
<?php esc_html_e( 'Create lists in HubSpot', 'makewebbetter-hubspot-for-woocommerce' ); ?>
</h2>
</div>
<div class="mwb-heb-wlcm__content">
<div class="hubwoo-content__para">
<p>
<?php
esc_html_e( 'Set up lists to segment your contacts and customers based on their previous actions and behaviors.', 'makewebbetter-hubspot-for-woocommerce' );
?>
</p>
<div>
<p>
<?php
esc_html_e( 'You can set up the following lists:', 'makewebbetter-hubspot-for-woocommerce' );
?>
<ul class="connect-list">
<li><?php esc_html_e( 'Leads: contacts that have not yet made any orders', 'makewebbetter-hubspot-for-woocommerce' ); ?></li>
<li><?php esc_html_e( 'Customers: contacts that have made at least one order', 'makewebbetter-hubspot-for-woocommerce' ); ?></li>
<li><?php esc_html_e( 'Abandoned Cart: contacts that have added products to their carts, but have not purchased', 'makewebbetter-hubspot-for-woocommerce' ); ?></li>
</ul>
</p>
</div>
</div>
<div class="mwb-heb-wlcm__btn-wrap hubwoo-btn-list">
<a href="#" class="hubwoo-btn--primary hubwoo-btn-data" data-action="lists_setup" style="display: <?php echo esc_attr( $cta['create'] ); ?>";><?php esc_html_e( 'Create Lists', 'makewebbetter-hubspot-for-woocommerce' ); ?></a>
<a href="#" class="hubwoo-btn--primary hubwoo-btn-data" data-action="lists_setup_manage" style="display: <?php echo esc_attr( $cta['created'] ); ?>"; ><?php esc_html_e( 'View All Lists', 'makewebbetter-hubspot-for-woocommerce' ); ?></a>
</div>
<div class="hubwoo-sub-content">
<div class="hubwoo-list__progress list-progress-bar" style="display: none;">
<p>
<strong><?php esc_html_e( 'List creation is in progress. This should only take a few moments. Thanks for your patience!', 'makewebbetter-hubspot-for-woocommerce' ); ?></strong>
</p>
<div class="hubwoo-progress">
<div class="hubwoo-progress-bar" role="progressbar" style="width:0">
</div>
</div>
</div>
<div class="hubwoo-list__manage" style="display: none;">
<?php if ( ! $list_setup ) { ?>
<div class="hubwoo-list-desc" style="display: none;">
<div class="hubwoo-list-desc__notice-sec">
<p>
<?php
esc_html_e( 'Select the Groups and Properties that you need on HubSpot.', 'makewebbetter-hubspot-for-woocommerce' );
?>
</p>
</div>
</div>
<form action="" method="post" id="hub-lists-form">
<div class="hubwoo-fields-created">
<?php
if ( count( $hubwoo_lists ) ) {
foreach ( $hubwoo_lists as $key => $single_list ) {
?>
<div class="hubwoo_groups">
<label class="hubwoo-custom-chheckbox">
<input <?php echo esc_attr( $hubwoo->required_lists_to_create( $single_list['detail']['name'] ) ); ?> name="selectedLists[]" type="checkbox" class="hub-lists" value="<?php echo esc_html( $single_list['detail']['name'] ); ?>">
</label>
<span class=""><?php echo esc_html( $single_list['detail']['name'] ); ?></span>
<div class="hubwoo_groups-content hubwoo_groups-content--p">
<?php
echo esc_html( $hubwoo_lists_desc[ $single_list['detail']['name'] ] );
?>
</div>
</div>
<?php
}
}
?>
</div>
</form>
<?php } else { ?>
<div class="hubwoo-fields-created">
<?php
if ( count( $hubwoo_lists ) ) {
foreach ( $hubwoo_lists as $key => $single_list ) {
?>
<div class="hubwoo_groups">
<?php if ( 'created' == $single_list['status'] ) { ?>
<label class="hubwoo-list-created">
<span class="hubwoo-cr-btn"><?php esc_html_e( 'Created', 'makewebbetter-hubspot-for-woocommerce' ); ?></span>
</label>
<?php } else { ?>
<label class="hubwoo-list-create">
<span data-name="<?php echo esc_attr( $single_list['detail']['name'] ); ?>" class="hubwoo-create-single-list hubwoo-cr-btn hubwoo-crd-btn"><?php esc_html_e( 'Create', 'makewebbetter-hubspot-for-woocommerce' ); ?></span>
</label>
<?php } ?>
<span class=""><?php echo esc_html( $single_list['detail']['name'] ); ?></span>
<div class="hubwoo_groups-content">
<?php
echo esc_html( $hubwoo_lists_desc[ $single_list['detail']['name'] ] );
?>
</div>
</div>
<?php
}
}
?>
</div>
<?php } ?>
</div>
</div>
</div>
</div>
</div>

View File

@@ -1,116 +0,0 @@
<?php
/**
* Manage eCommerce Pipeline and Deal stages creation.
*
* @link https://makewebbetter.com/
* @since 1.0.0
*
* @package makewebbetter-hubspot-for-woocommerce
* @subpackage makewebbetter-hubspot-for-woocommerce/admin/templates/setup/
*/
global $hubwoo;
$deal_stages = Hubwoo::get_all_deal_stages();
$fetch_pipeline = get_option( 'hubwoo_potal_pipelines', true );
$selected_pipeline = get_option( 'hubwoo_ecomm_pipeline_id', true );
$deal_stage_id = 'stageId';
if ( 'yes' == get_option( 'hubwoo_ecomm_pipeline_created', 'no' ) ) {
$deal_stage_id = 'id';
}
?>
<div class="hubwoo-box">
<div class="hubwoo-form-wizard-content hubwoo-deal-wrap-con" data-tab-content="map-deal-stage">
<div class="mwb-heb-wlcm__title">
<h2 class="pipeline-setup-heading">Map Deal Stages with eCommerce pipeline </h2>
</div>
<div class="hubwoo-general-settings hubwoo-group-wrap__map_deal_stage hubwoo-settings-container hubwoo-deal-wrap-con__store">
<div>
<table class="hubwoo-pipeline-stages-conf-table form-table">
<tr>
<th class="hubwoo-pipeline-wrap-con__thead"><?php esc_html_e( 'Select Pipeline', 'makewebbetter-hubspot-for-woocommerce' ); ?></th>
<td>
<select class="hubwoo_selected_pipeline" name="hubwoo_selected_pipeline">
<?php
if ( ! empty( $fetch_pipeline ) ) {
foreach ( $fetch_pipeline as $single_pipeline ) {
if ( $single_pipeline['id'] === $selected_pipeline ) {
?>
<option value="<?php echo esc_attr( $single_pipeline['id'] ); ?>" selected=""><?php echo esc_html( $single_pipeline['label'] ); ?></option>
<?php
} else {
?>
<option value="<?php echo esc_attr( $single_pipeline['id'] ); ?>"><?php echo esc_html( $single_pipeline['label'] ); ?></option>
<?php
}
}
}
?>
</select>
<a class="hubwoo_update_pipelines"><i class="fa fa-refresh" style="font-size:24px;"></i></a>
</td>
</tr>
</table>
</div>
<form action="#" method="post" class="hubwoo_save_ecomm_mapping">
<table class="hubwoo-deals-stages-conf-table form-table">
<thead>
<tr>
<th class="hubwoo-deal-wrap-con__thead"><?php esc_html_e( 'WooCommerce Order Status', 'makewebbetter-hubspot-for-woocommerce' ); ?></th>
<th><?php esc_html_e( 'Deal Stage', 'makewebbetter-hubspot-for-woocommerce' ); ?></th>
</tr>
</thead>
<tbody>
<?php $all_order_statuses = wc_get_order_statuses(); ?>
<?php
foreach ( $all_order_statuses as $order_key => $order_label ) {
$stage = Hubwoo::get_selected_deal_stage( $order_key );
?>
<tr>
<th class="hubwoo-deal-wrap-con__thead">
<?php echo esc_html( $order_label ); ?>
<input type="hidden" name="hubwoo_woo_order_statuses[]" value="<?php echo esc_html( $order_key ); ?>">
</th>
<td>
<select class="hubwoo_ecomm_mapping" name="hubwoo_deal_stages[]">
<?php
if ( ! empty( $deal_stages ) ) {
foreach ( $deal_stages as $single_deal_stage ) {
if ( $single_deal_stage[ $deal_stage_id ] === $stage ) {
?>
<option value="<?php echo esc_attr( $single_deal_stage[ $deal_stage_id ] ); ?>" selected=""><?php echo esc_html( $single_deal_stage['label'] ); ?></option>
<?php
} else {
?>
<option value="<?php echo esc_attr( $single_deal_stage[ $deal_stage_id ] ); ?>"><?php echo esc_html( $single_deal_stage['label'] ); ?></option>
<?php
}
}
}
?>
</select>
</td>
</tr>
<?php
}
?>
</tbody>
<tfoot>
<tr>
<td>
<a href="javascript:void(0);" id = "hubwoo-save-pipeline" class="hubwoo-save-pipeline hubwoo-btn--primary"><?php esc_html_e( 'Save', 'makewebbetter-hubspot-for-woocommerce' ); ?></a>
</td>
<td>
<button id="reset-deal-stages" class="hubwoo__btn hubwoo-btn--primary hubwoo-btn--dashboard"><?php esc_html_e( ' Reset to Default Mapping', 'makewebbetter-hubspot-for-woocommerce' ); ?>
</button>
</td>
</tr>
</tfoot>
</table>
</form>
</div>
</div>
</div>

View File

@@ -1,209 +0,0 @@
<?php
/**
* The admin-facing file for contacts sync.
*
* @link https://makewebbetter.com/
* @since 1.0.0
*
* @package makewebbetter-hubspot-for-woocommerce
* @subpackage makewebbetter-hubspot-for-woocommerce/admin/templates/setup
*/
if ( isset( $_GET['action'] ) && 'hubwoo-osc-schedule-sync' == $_GET['action'] ) {
update_option( 'hubwoo_greeting_displayed_setup', 'yes' );
Hubwoo_Admin::hubwoo_schedule_sync_listener();
wp_safe_redirect( admin_url( 'admin.php?page=hubwoo&hubwoo_tab=hubwoo-overview&hubwoo_key=sync' ) );
}
$total_registered_users = Hubwoo_Admin::hubwoo_get_all_users_count();
$sync_process['display_sync'] = 'block';
$sync_process['display_greet'] = 'none';
$sync_process['display_onboard'] = 'none';
if ( 'yes' == get_option( 'hubwoo_greeting_displayed_setup', 'no' ) ) {
$sync_process['display_sync'] = 'none';
$sync_process['display_greet'] = 'none';
$sync_process['display_onboard'] = 'block';
}
if ( 'yes' == get_option( 'hubwoo_onboard_user', 'no' ) ) {
$sync_process['display_sync'] = 'none';
$sync_process['display_onboard'] = 'none';
$sync_process['display_greet'] = 'block';
}
if ( empty( get_option( 'hubwoo_customers_role_settings', array() ) ) ) {
update_option( 'hubwoo_customers_role_settings', array_keys( Hubwoo_Admin::get_all_user_roles() ) );
}
$onboarding_data = Hubwoo::hubwoo_onboarding_questionaire();
?>
<div class="mwb-heb-welcome sync-page" style="display: <?php echo esc_html( $sync_process['display_sync'] ); ?>">
<div class="hubwoo-box">
<div class="mwb-heb-wlcm__title">
<h2>
<?php esc_html_e( 'Sync WooCommerce data with HubSpot', 'makewebbetter-hubspot-for-woocommerce' ); ?>
</h2>
</div>
<div class="mwb-heb-wlcm__content">
<div class="hubwoo-content__para">
<p>
<?php esc_html_e( 'Youre almost done! The last step is to sync your existing WooCommerce data to HubSpot. This will sync all your Contacts, Deals, and Products data to HubSpot.', 'makewebbetter-hubspot-for-woocommerce' ); ?>
</p>
<p>
<?php esc_html_e( 'Once you sync your data, youll see all your WooCommerce information on HubSpot so you can start engaging with them right away.', 'makewebbetter-hubspot-for-woocommerce' ); ?>
</p>
</div>
<div class="mwb-heb-wlcm__btn-wrap">
<a href="javascript:void(0);" id = "hubwoo-osc-instant-sync-historical" class="hubwoo-osc-instant-sync hubwoo-btn--primary" data-total_users= "<?php echo esc_attr( $total_registered_users ); ?>"><?php esc_html_e( 'Sync Now', 'makewebbetter-hubspot-for-woocommerce' ); ?></a>
<a href="?page=hubwoo&hubwoo_tab=hubwoo-sync-contacts&action=hubwoo-osc-schedule-sync" id = "hubwoo-osc-schedule-sync" id="hubwoo-osc-schedule-sync" class="hubwoo-osc-schedule-sync hubwoo__btn"><?php esc_html_e( 'Skip Historical Data Sync', 'makewebbetter-hubspot-for-woocommerce' ); ?></a>
</div>
</div>
<div class="hubwoo-progress-container" >
<div class="hubwoo-progress-wrap" style="display: none;">
<p>
<strong><?php esc_html_e( '1. Syncing Your Contacts to HubSpot. This should only take a few moments. Thanks for your patience!', 'makewebbetter-hubspot-for-woocommerce' ); ?></strong>
</p>
<div class="hubwoo-progress">
<div class="hubwoo-progress-bar" role="progressbar" style="width:0"></div>
</div>
</div>
<div class="hubwoo-progress-wrap-import" style="display: none;">
<p>
<strong><?php esc_html_e( '2. Syncing your Products to HubSpot. This should only take a few moments. Thanks for your patience!', 'makewebbetter-hubspot-for-woocommerce' ); ?></strong>
</p>
<div class="hubwoo-progress">
<div class="hubwoo-progress-bar" role="progressbar" style="width:0"></div>
</div>
</div>
<div class="hubwoo-progress-wrap-import-deals" style="display: none;">
<p>
<strong><?php esc_html_e( '3. Syncing your Deals to Hubspot. This should only take a few moments. Thanks for your patience!', 'makewebbetter-hubspot-for-woocommerce' ); ?></strong>
</p>
<div class="hubwoo-progress">
<div class="hubwoo-progress-bar" role="progressbar" style="width:0"></div>
</div>
</div>
</div>
</div>
</div>
<div id="hubwoo-visit-dashboard" class="acc-connected mwb-heb-welcome" style="display: <?php echo esc_attr( $sync_process['display_greet'] ); ?>">
<div class="hubwoo-box">
<div class="mwb-heb-wlcm__title">
<h2>
<?php esc_html_e( 'Congrats! Youve successfully set up the MWB HubSpot for WooCommerce plugin', 'makewebbetter-hubspot-for-woocommerce' ); ?>
</h2>
</div>
<div class="mwb-heb-wlcm__content">
<div class="hubwoo-content__para hubwoo-content__para--greeting">
<div class="hubwoo-content__para--greeting-img" >
<p>
<?php esc_html_e( "What's next? Go to your dashboard to learn more about the integration.", 'makewebbetter-hubspot-for-woocommerce' ); ?>
</p>
<div class="mwb-heb-wlcm__btn-wrap">
<a href="javascript:void(0);" class="hubwoo__btn hubwoo_manage_screen" data-process="greet-to-dashboard" data-tab="hubwoo_tab" ><?php esc_html_e( 'Visit DashBoard', 'makewebbetter-hubspot-for-woocommerce' ); ?></a>
</div>
</div>
<div class="hubwoo-content__para--greeting-content" >
<img height="150px" width="150px" src="<?php echo esc_url( HUBWOO_URL . 'admin/images/congo.jpg' ); ?>">
</div>
</div>
</div>
</div>
</div>
<div id="hubwoo-onboard-user" class="acc-connected mwb-heb-welcome" style="display: <?php echo esc_attr( $sync_process['display_onboard'] ); ?>">
<div class="hubwoo-box">
<div class="mwb-heb-wlcm__title">
<h2>
<?php esc_html_e( 'Get tailored onboarding emails straight to your inbox', 'makewebbetter-hubspot-for-woocommerce' ); ?>
</h2>
</div>
<div class="hubwoo-onboard-suburb">
<p><?php esc_html_e( 'Help us make your experience even better by telling us:', 'makewebbetter-hubspot-for-woocommerce' ); ?></p>
</div>
<div class="hubwoo-onboarding-email__body mwb-heb-wlcm__content">
<form action="#" method="POST" id="hubwoo-onboarding-form">
<div class="hubwoo-onboarding-email__body-content">
<div class="hubwoo-onboard-notice">
<span><?php esc_html_e( 'Please fill all of the below fields before submission', 'makewebbetter-hubspot-for-woocommerce' ); ?></span>
</div>
<?php
foreach ( $onboarding_data as $name => $data ) {
?>
<div class="hubwoo-onboarding-email__items">
<label class="hubwoo-onboard-suburb-label"><?php echo esc_textarea( $data['label'] ); ?></label>
<select name="<?php echo esc_attr( $name ); ?>[]" <?php echo esc_attr( $data['allow'] ); ?> class="hubwoo-form-control hubwoo-onquest <?php echo esc_attr( $name ); ?>">
<?php foreach ( $data['options'] as $option ) : ?>
<option value="<?php echo esc_attr( $option ); ?>"><?php echo esc_attr( $option ); ?></option>
<?php endforeach ?>
</select>
<img class="hubwoo-onboard-img" name="<?php echo esc_attr( $name ); ?>" height="20px" width="20px" src="<?php echo esc_url( HUBWOO_URL . 'admin/images/checked.png' ); ?>">
</div>
<?php
}
?>
<span class="hubwoo-onboarding-message hidefield hubwoo_register">
<?php esc_html_e( 'Choosing the ideal plan for your company might be confusing. ', 'makewebbetter-hubspot-for-woocommerce' ); ?>
<a target="_blank" href="https://meetings.hubspot.com/makewebbetter/free-hubspot-consultation"><?php esc_html_e( 'Connect Us ', 'makewebbetter-hubspot-for-woocommerce' ); ?></a>
<?php esc_html_e( 'and we can assist you for free.', 'makewebbetter-hubspot-for-woocommerce' ); ?>
</span>
<!-- code for adding first name field in form -->
<div class="hubwoo-onboarding-email__items flname hidefield hubwoo_register">
<label class="hubwoo-onboard-suburb-label"><?php esc_html_e( 'First Name', 'makewebbetter-hubspot-for-woocommerce' ); ?></label>
<input type="esc_textarea" placeholder="First Name" name="firstname" class="hubwoo-form-control-flname" >
<img class="hubwoo-onboard-img" name="firstname" height="20px" width="20px" src="<?php echo esc_url( HUBWOO_URL . 'admin/images/checked.png' ); ?>">
</div>
<!-- code for adding last name field in form -->
<div class="hubwoo-onboarding-email__items flname hidefield hubwoo_register">
<label class="hubwoo-onboard-suburb-label"><?php esc_html_e( 'Last Name', 'makewebbetter-hubspot-for-woocommerce' ); ?></label>
<input type="esc_textarea" placeholder="Last Name" name="lastname" class="hubwoo-form-control-flname" >
<img class="hubwoo-onboard-img" name="lastname" height="20px" width="20px" src="<?php echo esc_url( HUBWOO_URL . 'admin/images/checked.png' ); ?>">
</div>
<!-- code for adding company name field in form -->
<div class="hubwoo-onboarding-email__items hidefield hubwoo_register">
<label class="hubwoo-onboard-suburb-label"><?php esc_html_e( 'Company Name', 'makewebbetter-hubspot-for-woocommerce' ); ?></label>
<input type="esc_textarea" placeholder="Company Name" name="company" class="hubwoo-form-control" >
<img class="hubwoo-onboard-img" name="company" height="20px" width="20px" src="<?php echo esc_url( HUBWOO_URL . 'admin/images/checked.png' ); ?>">
</div>
<!-- code for adding company url field in form -->
<div class="hubwoo-onboarding-email__items hidefield hubwoo_register">
<label class="hubwoo-onboard-suburb-label"><?php esc_html_e( 'Website URL', 'makewebbetter-hubspot-for-woocommerce' ); ?></label>
<input type="esc_textarea" placeholder="URl where you'll install HubSpot" name="website" class="hubwoo-form-control" >
<img class="hubwoo-onboard-img" name="website" height="20px" width="20px" src="<?php echo esc_url( HUBWOO_URL . 'admin/images/checked.png' ); ?>">
</div>
<!-- code for adding email field in form -->
<div class="hubwoo-onboarding-email__items">
<label class="hubwoo-onboard-suburb-label"><?php esc_html_e( 'Email Address', 'makewebbetter-hubspot-for-woocommerce' ); ?></label>
<input type="email" placeholder="Email Address" name="email" class="hubwoo-form-control" value="<?php echo esc_textarea( get_user_by( 'id', get_current_user_id() )->data->user_email ); ?>">
<img class="hubwoo-onboard-img" name="email" height="20px" width="20px" src="<?php echo esc_url( HUBWOO_URL . 'admin/images/checked.png' ); ?>">
</div>
<!-- code for adding phone nuber field in form -->
<div class="hubwoo-onboarding-email__items">
<label class="hubwoo-onboard-suburb-label"><?php esc_html_e( 'Phone Number', 'makewebbetter-hubspot-for-woocommerce' ); ?></label>
<input type="esc_textarea" placeholder="Phone number" name="phone" class="hubwoo-form-control" >
<img class="hubwoo-onboard-img" name="phone" height="20px" width="20px" src="<?php echo esc_url( HUBWOO_URL . 'admin/images/checked.png' ); ?>">
</div>
<div class="onboard-spinner"><span class="fa fa-spinner fa-spin"></span></div>
<div class="hubwoo-onboarding-email__butttons">
<a href="javascript:void" data-type='sync' id= "hubwoo-complete-onboarding" class="hubwoo-onboard-manage hubwoo-btn--dashboard hubwoo-btn--primary"><?php esc_html_e( 'Complete Onboarding', 'makewebbetter-hubspot-for-woocommerce' ); ?></a>
<div class="hubwoo-onboard-manage hubwoo-onboarding-skip--link">
<a href="javascript:void" data-type='skip' class="hubwoo-onboard-manage" ><?php esc_html_e( 'Skip for now', 'makewebbetter-hubspot-for-woocommerce' ); ?></a>
</div>
</div>
</div>
</form>
</div>
</div>
</div>