Files
root b6df4dbb92 Snapshot: MLS sync fixes, image refresh, plugin/theme updates
MLS plugin fixes from this session:
- Fix silent insert failures: location column NOT NULL was rejecting wpdb->insert calls,
  causing ~18k new properties since Dec 2025 to be lost. Inserts now build raw SQL
  with ST_PointFromText so the spatial column is populated atomically.
- Auto-refresh expired media URLs in MLS_Media_Handler::fetch_and_cache(), guarded by
  a property-level GET_LOCK so concurrent fetches share one API refresh.
- Normalize WP_Error to null in mls_get_property_image() so callers can rely on the
  documented string|null contract.
- Support comma-separated property_type filters in MLS_Query and MLS_Cluster so the
  homepage "View All Commercial" link (?property_type=Commercial+Sale,Land,Farm)
  actually filters correctly.
- Incremental sync now looks back 10 minutes past the latest modification timestamp
  as a safety margin against missed records.
- Smart sync exits silently (info-level, not warning) when a full sync is in progress.

Operational:
- New cron: weekly full sync Sundays at 3 AM (/usr/local/bin/mls-full-sync).
- New cron: hourly 2GB cap on mls-thumbnails/ and cache/transformed-images/
  (/usr/local/bin/mls-image-cache-cap).
- Logrotate config for wp-content/debug.log (2-day retention, daily rotation,
  delaycompress).

Repo policy:
- CLAUDE.md updated with explicit "commit everything except build artifacts" policy.
- .gitignore: untrack runtime image caches and debug.log rotations.

Other modifications in this snapshot are pre-existing in-flight theme/plugin/db_content_updates work.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-29 15:32:23 +00:00

87 lines
3.6 KiB
PHP
Executable File

<?php
/**
* Single Payment page - Payment details template for single and subscription data.
*
* @since 1.8.2
* @since 1.8.6 Added $class variable.
*
* @var string $id Block id.
* @var string $class Extra Class based on type of payment.
* @var string $title Block title.
* @var string $payment_id Payment id.
* @var string $gateway_link Link to gateway payment details.
* @var string $gateway_text Gateway link text.
* @var string $gateway_name Gateway name.
* @var string $gateway_action_text Gateway action link text.
* @var string $gateway_action_link Gateway action link.
* @var string $gateway_action_slug Gateway action slug.
* @var int $payment_id_raw Payment id raw.
* @var string $status Payment or Subscription status.
* @var string $status_label Payment or Subscription status label.
* @var bool $disabled Is gateway action disabled.
* @var array $stat_cards Stat cards to display.
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
?>
<div id="<?php echo esc_attr( $id ); ?>" class="postbox <?php echo esc_attr( $class ); ?>">
<div class="postbox-header">
<h2 class="hndle">
<span><?php echo esc_html( $title ); ?></span>
<?php if ( isset( $payment_id ) ) : ?>
<span class="wpforms-payment-id"><?php echo esc_html( $payment_id ); ?></span>
<?php endif; ?>
</h2>
</div>
<div class="inside">
<ul class="wpforms-payments-details-list">
<?php foreach ( $stat_cards as $key => $stat_card ) : ?>
<li class="wpforms-payments-details-stat-card">
<button class="<?php echo wpforms_sanitize_classes( $stat_card['button_classes'], true ); ?>" >
<span class="stat-card-label"><?php echo esc_html( $stat_card['label'] ); ?></span>
<span class="stat-card-value">
<?php echo ! empty( $stat_card['value'] ) ? esc_html( $stat_card['value'] ) : esc_html__( 'N/A', 'wpforms-lite' ); ?>
<?php if ( ! empty( $stat_card['tooltip'] ) ) : ?>
<i class="wpforms-single-payment-tooltip" data-tooltip-content="#wpforms-single-payment-tooltip-content-<?php echo esc_attr( $key ); ?>"></i>
<span id="wpforms-single-payment-tooltip-content-<?php echo esc_attr( $key ); ?>" class="wpforms-single-payment-tooltip-content"><?php echo wp_kses_post( $stat_card['tooltip'] ); ?></span>
<?php endif; ?>
</span>
</button>
</li>
<?php endforeach; ?>
</ul>
</div>
<div class="wpforms-payment-actions">
<div class="status">
<span class="wpforms-payment-action-status-label"><?php esc_html_e( 'Status:', 'wpforms-lite' ); ?></span>
<span class="wpforms-payment-action-status-value <?php echo esc_attr( $status ); ?>"><?php echo wp_kses( $status_label, [ 'span' => [] ] ); ?></span>
</div>
<?php if ( $gateway_link ) : ?>
<div class="actions">
<a href="<?php echo esc_url( $gateway_link ); ?>" class="link" target="_blank" rel="noopener noreferrer">
<?php echo esc_html( $gateway_text ); ?>
</a>
<?php if ( ! $disabled ) : ?>
<a href="<?php echo esc_url( $gateway_action_link ); ?>"
class="button wpforms-payments-single-action"
target="_blank"
rel="noopener noreferrer"
id="wpforms-payments-single-<?php echo esc_attr( $gateway_action_slug ); ?>"
data-action-id="<?php echo esc_attr( $payment_id_raw ); ?>"
data-gateway="<?php echo esc_attr( $gateway_name ); ?>"
data-action-type="<?php echo esc_attr( $gateway_action_slug ); ?>">
<?php echo esc_html( $gateway_action_text ); ?>
</a>
<?php endif; ?>
</div>
<?php endif; ?>
<div class="clear"></div>
</div>
</div>