Skip to content

Commit

Permalink
Merge pull request #3363 from 10up/chore/orders-autosuggest-message
Browse files Browse the repository at this point in the history
Change Orders Autosuggest message
  • Loading branch information
felipeelia authored Mar 3, 2023
2 parents 73df90f + 11f395e commit 54f0141
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 13 deletions.
31 changes: 19 additions & 12 deletions includes/classes/Feature/WooCommerce/WooCommerce.php
Original file line number Diff line number Diff line change
Expand Up @@ -913,18 +913,25 @@ public function output_feature_box_settings() {
<div class="input-wrap">
<label><input name="settings[orders]" type="radio" <?php checked( $enabled ); ?> <?php disabled( $available, false, true ); ?> value="1"><?php echo wp_kses_post( __( 'Enabled', 'elasticpress' ) ); ?></label><br>
<label><input name="settings[orders]" type="radio" <?php checked( ! $enabled ); ?> <?php disabled( $available, false, true ); ?> value="0"><?php echo wp_kses_post( __( 'Disabled', 'elasticpress' ) ); ?></label>
<?php if ( ! $available ) : ?>
<p class="field-description">
<?php esc_html_e( 'Due to the sensitive nature of orders, this autosuggest feature is available only to ElasticPress.io customers.', 'elasticpress' ); ?>
<?php
printf(
'<a href="%1$s" target="_blank">%2$s</a>',
'https://elasticpress.zendesk.com/hc/en-us/articles/13374461690381-Configuring-ElasticPress-io-Order-Autosuggest',
esc_html__( 'Learn more.', 'elasticpress' )
);
?>
</p>
<?php endif; ?>
<p class="field-description">
<?php
$epio_autosuggest_kb_link = 'https://elasticpress.zendesk.com/hc/en-us/articles/13374461690381-Configuring-ElasticPress-io-Order-Autosuggest';

$message = ( $available ) ?
/* translators: 1: <a> tag (ElasticPress.io); 2. </a>; 3: <a> tag (KB article); 4. </a>; */
__( 'You are directly connected to %1$sElasticPress.io%2$s! Enable Orders Autosuggest to enhance Dashboard results and quickly find WooCommerce Orders. %3$sLearn More%4$s.', 'elasticpress' ) :
/* translators: 1: <a> tag (ElasticPress.io); 2. </a>; 3: <a> tag (KB article); 4. </a>; */
__( 'Due to the sensitive nature of orders, this autosuggest feature is available only to %1$sElasticPress.io%2$s customers. %3$sLearn More%4$s.', 'elasticpress' );

printf(
wp_kses( $message, 'ep-html' ),
'<a href="https://elasticpress.io/" target="_blank">',
'</a>',
'<a href="' . esc_url( $epio_autosuggest_kb_link ) . '" target="_blank">',
'</a>'
);
?>
</p>
</div>
</div>
<?php
Expand Down
5 changes: 4 additions & 1 deletion includes/dashboard.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,10 @@ function filter_allowed_html( $allowedtags, $context ) {
'target' => true,
];

$ep_tags['a'] = $atts;
$ep_tags['a'] = array_merge(
$atts,
[ 'target' => true ]
);

return $ep_tags;
}
Expand Down

0 comments on commit 54f0141

Please sign in to comment.