Guest User

Untitled

a guest
Mar 16th, 2020
16
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. if ( ! defined( 'ABSPATH' ) ) {
  3.     exit;
  4. }
  5.  
  6. if ( $tracking_items ) {
  7.  
  8.     $wcast_customizer_settings = new wcast_initialise_customizer_settings();
  9.     $ast = new WC_Advanced_Shipment_Tracking_Actions;
  10.  
  11.     if ( get_theme_mod( 'header_text_change' ) ) {
  12.         $shipment_tracking_header = get_theme_mod( 'header_text_change' );
  13.     } else {
  14.         $shipment_tracking_header = 'Tracking Information';
  15.     }
  16.     if ( get_theme_mod( 'additional_header_text' ) ) {
  17.         $shipment_tracking_header_text = get_theme_mod( 'additional_header_text' );
  18.     }
  19.  
  20.     $provider_header_text = $ast->get_option_value_from_array( 'tracking_info_settings', 'provider_header_text', $wcast_customizer_settings->defaults['provider_header_text'] );
  21.     $tracking_number_header_text = $ast->get_option_value_from_array( 'tracking_info_settings', 'tracking_number_header_text', $wcast_customizer_settings->defaults['tracking_number_header_text'] );
  22.     $track_header_text = $ast->get_option_value_from_array( 'tracking_info_settings', 'track_header_text', $wcast_customizer_settings->defaults['track_header_text'] );
  23.  
  24.     echo strtoupper( apply_filters( 'woocommerce_shipment_tracking_my_orders_title', __( $shipment_tracking_header, 'woo-advanced-shipment-tracking' ) ) ) . "\n\n";
  25.     if ( isset( $shipment_tracking_header_text ) ) {
  26.         echo $shipment_tracking_header_text . "\n\n";
  27.     }
  28.     if ( isset( $new_status ) ) {
  29.         echo sprintf( __( 'Shipment status changed to %s', 'woo-advanced-shipment-tracking' ), apply_filters( "trackship_status_filter", $new_status ) ) . "\n\n";
  30.     }
  31.  
  32.     foreach ( $tracking_items as $tracking_item ) {
  33.         $url = str_replace( '%number%', $tracking_item['tracking_number'], $tracking_item['formatted_tracking_link'] );
  34.         echo __( $provider_header_text, 'woo-advanced-shipment-tracking' ) . ": " . apply_filters( 'ast_provider_title', esc_html( $tracking_item['formatted_tracking_provider'] ) ) . "\n";
  35.         echo __( $tracking_number_header_text, 'woo-advanced-shipment-tracking' ) . ": " . esc_html( $tracking_item['tracking_number'] ) . "\n";
  36.         echo __( $track_header_text, 'woo-advanced-shipment-tracking' ) . ": " . esc_url( $url ) . "\n\n";
  37.     }
  38.  
  39.     echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n\n";
  40. }
RAW Paste Data