-
Notifications
You must be signed in to change notification settings - Fork 813
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
Widgets - Simple Payments: fix a few issues #9863
Conversation
03aad3d
to
244b196
Compare
244b196
to
d51304a
Compare
@eliorivero I Merged Mike's PR and rebased this one |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thank you
modules/widgets/simple-payments.php
Outdated
require_lib( 'tracks/client' ); | ||
tracks_record_event( $current_user, 'simple_payments_button_' . $event_action, $event_properties ); | ||
jetpack_require_lib( 'tracks/client' ); | ||
jetpack_tracks_record_event( $current_user, 'simple_payments_button_' . $event_action, $event_properties ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this block of code is for WordPress.com, where jetpack_*
functions are not available.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated 👍
d51304a
to
2390cd0
Compare
…d syntax error and missing translation domain
2390cd0
to
592aebb
Compare
@@ -96,7 +96,7 @@ class="field-currency widefat jetpack-simple-payments-form-product-currency" | |||
name="<?php echo esc_attr( $this->get_field_name( 'form_product_currency' ) ); ?>"> | |||
<?php foreach( Jetpack_Simple_Payments_Widget::$supported_currency_list as $code => $currency ) {?> | |||
<option value="<?php echo esc_attr( $code ) ?>"<?php selected( $instance['form_product_currency'], $code ); ?>> | |||
<?php esc_html_e( $code . ' ' . $currency ) ?> | |||
<?php echo esc_html( "$code $currency" ); ?> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replacing this here because esc_html_e
is meant to be used when translating and displaying, not just displaying.
…ated for translation.
Generated by 🚫 dangerJS |
Just for the record, this is blocking D14005-code, that enables the SP Widget on WordPress.com. |
@oskosk any idea on the timeline when this could be merged? I believe we'll want this in before we land on wpcom for fusion to sync properly. |
Follow-up to #9859
Changes proposed in this Pull Request:
$errors.add( 'illegal_params' );
->add
jetpack
translation domainrequire_lib
andtracks_record_event
Testing instructions
Test with PHP 5.2 and ensure the widget works normally.
Proposed changelog entry for your changes:
PHP 5.2 Compatibility for Simple Payments Widget