The ajax processing message in Direct Stripe is filtered by the filter hook ‘direct_stripe_processing_transaction_spinner’.
Five parameters are passed :
- The whole html content
- The first html line
<div id="loadingDS" style="display:none;">
- The last html line
</div>
- The html line with text (Processing animated)
<h2 class="loadingDS" data-text="' . __('Processing', 'direct-stripe') . '">' . __('Processing', 'direct-stripe') . '</h2>
- The html line with svg image (dots)
<img src="' . DSCORE_URL . '/assets/images/three-dots.svg" width="60" alt="">
The next example returns a custom image that will show when transaction is processing.
function ds_change_spinnner_image( $html, $begin, $end ) { $html = $begin; $html .= '<img src="my-custom-svg-or-gif-uri" alt="" width="60" />'; $html .= $end; return $html; } add_filter('direct_stripe_processing_transaction_spinner', 'ds_change_spinnner_image', 10, 3 );
The ‘my-custom-svg-or-gif-uri’ is to be replaced by the custom uri of the spinner image!