somenickname
Forum Replies Created
Viewing 5 replies - 1 through 5 (of 5 total)
-
Forum: Plugins
In reply to: [WooCommerce] iframe post timing issue.Thanks, I give the ‘pay’ page a go for now.
Forum: Plugins
In reply to: [WooCommerce CCAvenue gateway] process_payment, timing issue for iframe.wrong forum
Forum: Plugins
In reply to: [WooCommerce CCAvenue gateway] process_payment, timing issue for iframe.payment_fields function:
echo <script async defer src="https://raven-cdn.deepcovelabs.com/iframe-v1/embed.js" data-key-id="ernest"></script>
Forum: Plugins
In reply to: [WooCommerce] Payment Gateway extension, hide/show plugin(extension) settingsThanks Mike. Here is my hack, it is not pretty. Any recommendation, critiques are welcome.
public function admin_options() { ?> <script type="text/javascript"> jQuery( document ).ready( function( $ ) { if( 'hosted' == $( '#woocommerce_raven_spg_ui_mode :selected' ).text() ){ $( 'input.iframe' ).closest( 'tr' ).hide(); $( 'input.hosted' ).closest( 'tr' ).show(); } else { $( 'input.iframe' ).closest( 'tr' ).show(); $( 'input.hosted' ).closest( 'tr' ).hide(); } $( '#woocommerce_raven_spg_ui_mode' ).change(function(){ if( 'hosted' == $( '#woocommerce_raven_spg_ui_mode :selected' ).text() ){ $('input.iframe').closest('tr').hide(); $('input.hosted').closest('tr').show(); } else { $('input.iframe').closest('tr').show(); $('input.hosted').closest('tr').hide(); } }); }); </script> <?php echo '<h3>' . __( 'My Gateway', 'domain-spg' ) . '</h3>'; echo '<table class="form-table">'; // Generate the HTML For the settings form. $this->generate_settings_html(); echo '</table>'; }
Forum: Plugins
In reply to: [WooCommerce] Payment Gateway extension, hide/show plugin(extension) settingsMike,
I am new to wp and woo, i am usually in c#I have added
'class' => array('iframe')
to one of my fields like this:'google_analytics' => [ 'title' => __( 'Google Analytics','pacnet-spg' ), 'type' => 'text', 'description' => __( 'Google Analytics account number.','pacnet-spg' ), 'desc_tip' => true, 'placeholder' => __( 'Optional', 'pacnet-spg' ), 'class' => array('hosted'), ],
no joy, I see the
hosted
class only on the input field . I am using$this->generate_settings_html()
to create the setting html.how does one get the
class
to the table row?
what is the recommend wp/woo way to add javascript?
Vanilla JS or jquery?
Is there a link to an example somewhere?Thanks
Viewing 5 replies - 1 through 5 (of 5 total)