Skip to content
Merged
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: 8 additions & 2 deletions _inc/client/components/jetpack-notices/feedback-dash-request.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@ import NoticeAction from 'components/notice/notice-action.jsx';
/**
* Internal dependencies
*/
import { isDevVersion as _isDevVersion } from 'state/initial-state';
import {
isNoticeDismissed as _isNoticeDismissed,
dismissJetpackNotice,
} from 'state/jetpack-notices';
import { JETPACK_CONTACT_SUPPORT } from 'constants/urls';
import { JETPACK_CONTACT_SUPPORT, JETPACK_CONTACT_BETA_SUPPORT } from 'constants/urls';

class FeedbackDashRequest extends React.Component {
static displayName = 'FeedbackDashRequest';
Expand All @@ -24,6 +25,10 @@ class FeedbackDashRequest extends React.Component {
return;
}

const supportURl = this.props.isDevVersion
? JETPACK_CONTACT_BETA_SUPPORT
: JETPACK_CONTACT_SUPPORT;

return (
<div>
<SimpleNotice
Expand All @@ -32,7 +37,7 @@ class FeedbackDashRequest extends React.Component {
onDismissClick={ this.props.dismissNotice }
text={ __( 'What would you like to see on your Jetpack Dashboard?' ) }
>
<NoticeAction href={ JETPACK_CONTACT_SUPPORT }>{ __( 'Let us know!' ) }</NoticeAction>
<NoticeAction href={ supportURl }>{ __( 'Let us know!' ) }</NoticeAction>
</SimpleNotice>
</div>
);
Expand All @@ -46,6 +51,7 @@ class FeedbackDashRequest extends React.Component {
export default connect(
state => {
return {
isDevVersion: _isDevVersion( state ),
isDismissed: notice => _isNoticeDismissed( state, notice ),
};
},
Expand Down
11 changes: 8 additions & 3 deletions _inc/client/components/support-card/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ import analytics from 'lib/analytics';
* Internal dependencies
*/
import { PLAN_JETPACK_PERSONAL } from 'lib/plans/constants';
import { isAtomicSite, getUpgradeUrl } from 'state/initial-state';
import { isAtomicSite, isDevVersion as _isDevVersion, getUpgradeUrl } from 'state/initial-state';
import { getSitePlan, isFetchingSiteData } from 'state/site';
import { getSiteConnectionStatus } from 'state/connection';
import JetpackBanner from 'components/jetpack-banner';
import { JETPACK_CONTACT_SUPPORT } from 'constants/urls';
import { JETPACK_CONTACT_SUPPORT, JETPACK_CONTACT_BETA_SUPPORT } from 'constants/urls';

class SupportCard extends React.Component {
static displayName = 'SupportCard';
Expand Down Expand Up @@ -69,6 +69,10 @@ class SupportCard extends React.Component {
'undefined' === typeof this.props.sitePlan.product_slug ||
'jetpack_free' === this.props.sitePlan.product_slug;

const jetpackSupportURl = this.props.isDevVersion
? JETPACK_CONTACT_BETA_SUPPORT
: JETPACK_CONTACT_SUPPORT;

return (
<div className={ classes }>
<Card className="jp-support-card__happiness">
Expand All @@ -85,7 +89,7 @@ class SupportCard extends React.Component {
href={
this.props.isAtomicSite
? 'https://wordpress.com/help/contact/'
: JETPACK_CONTACT_SUPPORT
: jetpackSupportURl
}
>
{ __( 'Ask a question' ) }
Expand Down Expand Up @@ -128,6 +132,7 @@ export default connect( state => {
siteConnectionStatus: getSiteConnectionStatus( state ),
isFetchingSiteData: isFetchingSiteData( state ),
isAtomicSite: isAtomicSite( state ),
isDevVersion: _isDevVersion( state ),
supportUpgradeUrl: getUpgradeUrl( state, 'support' ),
};
} )( SupportCard );
6 changes: 5 additions & 1 deletion _inc/lib/debugger/class-jetpack-debug-data.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,10 @@ public static function seconds_to_time( $seconds ) {
* @return array $args Debug information in the same format as the initial argument.
*/
public static function core_debug_data( $debug ) {
$support_url = Jetpack::is_development_version()
? 'https://jetpack.com/contact-support/beta-group/'
: 'https://jetpack.com/contact-support/';

$jetpack = array(
'jetpack' => array(
'label' => __( 'Jetpack', 'jetpack' ),
Expand All @@ -103,7 +107,7 @@ public static function core_debug_data( $debug ) {
'Diagnostic information helpful to <a href="%1$s" target="_blank" rel="noopener noreferrer">your Jetpack Happiness team<span class="screen-reader-text">%2$s</span></a>',
'jetpack'
),
esc_html( 'https://jetpack.com/contact-support/' ),
esc_url( $support_url ),
__( '(opens in a new tab)', 'jetpack' )
),
'fields' => self::debug_data(),
Expand Down
8 changes: 6 additions & 2 deletions _inc/lib/debugger/class-jetpack-debugger.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ public static function jetpack_debug_display_handler() {
wp_die( esc_html__( 'You do not have sufficient permissions to access this page.', 'jetpack' ) );
}

$support_url = Jetpack::is_development_version()
? 'https://jetpack.com/contact-support/beta-group/'
: 'https://jetpack.com/contact-support/';

$data = Jetpack_Debug_Data::debug_data();
$debug_info = '';
foreach ( $data as $datum ) {
Expand Down Expand Up @@ -225,7 +229,7 @@ public static function jetpack_debug_display_handler() {
__( '<a href="%1$s">Contact our Happiness team</a>. When you do, please include the <a href="%2$s">full debug information from your site</a>.', 'jetpack' ),
array( 'a' => array( 'href' => array() ) )
),
'https://jetpack.com/contact-support/',
esc_url( $support_url ),
esc_url( admin_url() . 'site-health.php?tab=debug' )
);
$hide_debug = true;
Expand All @@ -236,7 +240,7 @@ public static function jetpack_debug_display_handler() {
__( '<a href="%s">Contact our Happiness team</a>. When you do, please include the full debug information below.', 'jetpack' ),
array( 'a' => array( 'href' => array() ) )
),
'https://jetpack.com/contact-support/'
esc_url( $support_url )
);
$hide_debug = false;
}
Expand Down