← All changes
|
inc/page-builders/elementor/payment-history-widget.php
+15
-0
2.12.2
→
2.12.8
View file →
| @@ -78,8 +78,23 @@ | ||
| 78 | 78 | ]; |
| 79 | 79 | } |
| 80 | 80 | |
| 81 | 81 | /** |
| 82 | + * Declare the payment-history stylesheet as a widget style dependency so Elementor | |
| 83 | + * enqueues it in the <head>. This widget's content lives in postmeta, so the | |
| 84 | + * shortcode's has_block()/has_shortcode() gate on wp_enqueue_scripts can't detect | |
| 85 | + * it; without this the CSS would only load at render() time (footer) and the | |
| 86 | + * dashboard would flash unstyled (FOUC). The handle is registered by | |
| 87 | + * Payment_History_Shortcode::register_assets() on wp_enqueue_scripts (priority 1). | |
| 88 | + * | |
| 89 | + * @since 2.12.3 | |
| 90 | + * @return array<string> Style handles this widget depends on. | |
| 91 | + */ | |
| 92 | + public function get_style_depends() { | |
| 93 | + return [ 'srfm-payment-history' ]; | |
| 94 | + } | |
| 95 | + | |
| 96 | + /** | |
| 82 | 97 | * Register widget controls. |
| 83 | 98 | * |
| 84 | 99 | * @since 2.12.2 |
| 85 | 100 | * @return void |