This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action( 'wc_gateway_stripe_process_response', 'prefix_wc_gateway_stripe_process_response', 20, 2 ); | |
function prefix_wc_gateway_stripe_process_response( $response, $order ){ | |
if($response->source->type == 'three_d_secure'){ | |
$order->update_status('completed', 'order_note'); #### | |
//WC_Stripe_Logger::log( 'wc_gateway_stripe_process_response three_d_secure response: ' . print_r( $response->source->type, true ) ); | |
}elseif($response->source->type == 'card'){ | |
$order->update_status('failed', 'order_note'); #### | |
//WC_Stripe_Logger::log( 'wc_gateway_stripe_process_response card response: ' . print_r( $response->source->type, true ) ); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// create shortcode to list all clothes which come in blue | |
function statesmen_news_shortcode( $atts ) { | |
$html = ''; | |
// Attributes | |
$atts = shortcode_atts( | |
array( | |
'post_per_page' => '2', | |
'post_type' => 'post', | |
'id' => false | |
), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$fields = array( | |
'author' => '<ul class="row"><li class="col-sm-6"><label>' . '<input class="form-control" id="author" name="author" type="text" placeholder="' . esc_attr__( "Name", "text-domain" ) . '" value="' . esc_attr( $commenter['comment_author'] ) . '" size=""' . $aria_req . ' /></label></li>', | |
'email' => '<li class="col-sm-6"><label>' . '<input class="form-control" name="email" type="text" placeholder="' . esc_attr__( "Email", "text-domain" ) . '" value="' . esc_attr( $commenter['comment_author_email'] ) . '" size=""' . $aria_req . ' /></label></li>', | |
); | |
comment_form(array('fields'=>$fields)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function glowlogix_comment_field($comment_field){ | |
$comment_field = | |
'<li class="col-sm-12"> | |
<textarea required placeholder="MESSAGE" class="form-control" name="comment" aria-required="true"></textarea> | |
</li>'; | |
return $comment_field; | |
} | |
add_filter('comment_form_field_comment', 'glowlogix_comment_field'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// create post comment button | |
function glowlogix_comment_button() { | |
echo '<input name="submit" type="submit" class="btn margin-top-20" value="Send">'; | |
} | |
add_action( 'comment_form', 'glowlogix_comment_button' ); | |
For remove default button add "display: none" property in your style.css file |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Function for customize default design of comment template | |
function glowlogix_comment($comment, $args, $depth) { | |
if ( 'div' === $args['style'] ) { | |
$tag = 'div'; | |
$add_below = 'comment'; | |
} else { | |
$tag = 'li'; | |
$add_below = 'div-comment'; | |
} | |
?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* C.1. Custom Billing Field | |
*/ | |
add_filter( 'woocommerce_billing_fields' , 'wc_custom_fields' ); | |
function wc_custom_fields( $fields ) { | |
$fields['billing_reservationcode'] = array( | |
'type' => 'text', | |
'required' => true, | |
'class' => array('reservationcode'), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
application/x-httpd-php functions.php ( PHP script, ASCII text ) | |
<?php | |
/** | |
* | |
* 1. Bond Only - Expedia, Direct, HomeAway | |
* https://readysethost.co/checkout/?add-to-cart=772:1:2.00&rcode=TST2&fname=Mike&lname=Aubor&email=damiike%40gmail.com | |
* 2. Booking Only - Booking.com, Direct, HomeAway | |
* https://readysethost.co/checkout/?add-to-cart=1334:1:1.00&rcode=TST2&fname=Mike&lname=Aubor&email=damiike%40gmail.com | |
* 3. Booking Deposit Only - Direct, HomeAway |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function($) { | |
//id of sidebar | |
var element = $('#sidebar') | |
originalY = $(element).offset().top; | |
// Space between element and top of screen (when scrolling) | |
var topMargin = 20; | |
// Should probably be set in CSS; but here just for emphasis | |
element.css('position', 'relative'); | |
$(window).on('scroll', function(event) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function($) { | |
//id of sidebar | |
var element = $('#sidebar') | |
originalY = $(element).offset().top; | |
// Space between element and top of screen (when scrolling) | |
var topMargin = 20; | |
// Should probably be set in CSS; but here just for emphasis | |
element.css('position', 'relative'); | |
$(window).on('scroll', function(event) { |