| Conditions | 4 |
| Paths | 4 |
| Total Lines | 31 |
| Code Lines | 25 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 23 | public static function output( $post ) { |
||
| 24 | |||
| 25 | // Retrieve shipping address. |
||
| 26 | $shipping_address = get_post_meta( $post->ID, 'shipping_address', true ); |
||
| 27 | |||
| 28 | // Abort if it is invalid. |
||
| 29 | if ( ! is_array( $shipping_address ) ) { |
||
| 30 | return; |
||
| 31 | } |
||
| 32 | |||
| 33 | ?> |
||
| 34 | |||
| 35 | <div class="bsui"> |
||
| 36 | |||
| 37 | <?php foreach ( getpaid_user_address_fields() as $key => $label ) : ?> |
||
| 38 | |||
| 39 | <?php if ( ! empty( $shipping_address[ $key ] ) ) : ?> |
||
| 40 | |||
| 41 | <div class="form-group form-row"> |
||
| 42 | <div class="col"> |
||
| 43 | <span style="font-weight: 600"><?php echo sanitize_text_field( $label ); ?>:</span> |
||
| 44 | </div> |
||
| 45 | <div class="col"> |
||
| 46 | <?php echo self::prepare_for_display( $shipping_address, $key ); ?> |
||
| 47 | </div> |
||
| 48 | </div> |
||
| 49 | |||
| 50 | <?php endif; ?> |
||
| 51 | |||
| 52 | <?php endforeach; ?> |
||
| 53 | |||
| 54 | </div> |
||
| 86 |