Skip to content

Commit

Permalink
Update Package Tracking strings
Browse files Browse the repository at this point in the history
  • Loading branch information
InpsydeNiklas committed Sep 13, 2023
1 parent d3a02e7 commit 6e8d068
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
18 changes: 14 additions & 4 deletions modules/ppcp-order-tracking/src/MetaBoxRenderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public function render( $post_or_order_object ): void {
?>
<div class="ppcp-tracking-columns-wrapper">
<div class="ppcp-tracking-column">
<h3><?php echo esc_html__( 'Add New Shipment Tracking to PayPal order', 'woocommerce-paypal-payments' ); ?></h3>
<h3><?php echo esc_html__( 'Send Package Tracking Data to PayPal', 'woocommerce-paypal-payments' ); ?></h3>
<p>
<label for="ppcp-tracking-transaction_id"><?php echo esc_html__( 'Transaction ID', 'woocommerce-paypal-payments' ); ?></label>
<input type="text" disabled class="ppcp-tracking-transaction_id disabled" id="ppcp-tracking-transaction_id" name="ppcp-tracking[transaction_id]" value="<?php echo esc_attr( $transaction_id ); ?>" />
Expand Down Expand Up @@ -155,18 +155,28 @@ public function render( $post_or_order_object ): void {
<input type="text" class="ppcp-tracking-carrier_name_other" id="ppcp-tracking-carrier_name_other" name="ppcp-tracking[carrier_name_other]" />
</p>
<input type="hidden" class="ppcp-tracking-order_id" name="ppcp-tracking[order_id]" value="<?php echo (int) $wc_order->get_id(); ?>"/>
<p><button type="button" class="button submit_tracking_info"><?php echo esc_html__( 'Add Shipment', 'woocommerce-paypal-payments' ); ?></button></p>
<p><button type="button" class="button submit_tracking_info"><?php echo esc_html__( 'Add Package Tracking', 'woocommerce-paypal-payments' ); ?></button></p>
</div>
<div class="ppcp-tracking-column shipments">
<h3><?php echo esc_html__( 'Shipments', 'woocommerce-paypal-payments' ); ?></h3>
<h3><?php echo esc_html__( 'Package Tracking', 'woocommerce-paypal-payments' ); ?></h3>
<?php
foreach ( $shipments as $shipment ) {
$shipment->render( $this->allowed_statuses );
}
?>
<?php if ( empty( $shipments ) ) : ?>
<p class="ppcp-tracking-no-shipments"><?php echo esc_html__( 'No PayPal Shipment Tracking added to this order yet. Add new Shipment Tracking or reload the page to refresh', 'woocommerce-paypal-payments' ); ?></p>
<?php
$documentation_url = 'https://woocommerce.com/document/woocommerce-paypal-payments/#package-tracking';
$message = sprintf(
/* translators: %1$s: the documentation URL opening HTML tag, %2$s: the link ending HTML tag. */
esc_html__( 'No PayPal Package Tracking added to this order yet. Add new Package Tracking or reload the page to refresh. %1$sLearn more%2$s about the benefits of sharing package tracking data with PayPal.', 'woocommerce-paypal-payments' ),
'<a href="' . esc_url( $documentation_url ) . '">',
'</a>'
);
?>
<p class="ppcp-tracking-no-shipments"><?php echo $message; ?></p>
<?php endif; ?>

</div>
<div class="blockUI blockOverlay ppcp-tracking-loader"></div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion modules/ppcp-order-tracking/src/OrderTrackingModule.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ function() use ( $meta_box_renderer, $bearer ) {

add_meta_box(
'ppcp_order-tracking',
__( 'PayPal Shipment Tracking', 'woocommerce-paypal-payments' ),
__( 'PayPal Package Tracking', 'woocommerce-paypal-payments' ),
array( $meta_box_renderer, 'render' ),
$screen,
'normal'
Expand Down

0 comments on commit 6e8d068

Please sign in to comment.