This file contains 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
// Change first letter of XML tag <Orders> to lowercase. | |
function custom_xml_root_element( $export_type ) { | |
return lcfirst( $export_type ); | |
} | |
add_filter( 'wc_customer_order_xml_export_suite_xml_root_element', 'custom_xml_root_element', 10, 1 ); | |
// Change <Order> tage name. | |
function custom_order_format_tag_name( $orders_format, $orders ) { | |
$orders_format = array( | |
'order' => $orders, |
This file contains 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
<?php $category = get_the_category(); ?> | |
<div class="col-md-6 filter <?php echo esc_attr( $category[0]->slug ); ?>"> | |
// Content | |
</div> |
This file contains 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
jQuery(document).ready(function($){ | |
// Quick view ajax function on products page | |
$('.quick-view-link, .quick-view-button').on('click', function() { | |
var post_id = $(this).data('id'); | |
$.ajax({ | |
url : modal_ajax.url, | |
type : 'post', | |
data : { |
This file contains 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 wp_is_rtl( $locale = '' ) { | |
static $rtl_locales = array( | |
'ar' => 'Arabic', | |
'ary' => 'Moroccan Arabic', | |
'azb' => 'South Azerbaijani', | |
'fa_IR' => 'Persian', | |
'haz' => 'Hazaragi', | |
'he_IL' => 'Hebrew', | |
'ps' => 'Pashto', | |
'ug_CN' => 'Uighur', |
This file contains 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
<?php | |
if( have_rows('repeater_field') ): | |
$postCount = 1; | |
while( have_rows('repeater_field') ) : the_row(); ?> | |
<?php | |
$repeater_sub_field_1 = get_sub_field('repeater_sub_field_1'); | |
$repeater_sub_field_2 = get_sub_field('repeater_sub_field_2'); | |
$repeater_sub_field_3 = get_sub_field('repeater_sub_field_3'); |
This file contains 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
/** | |
* Clears WC Cart on Page Load | |
* (Only when not on cart/checkout page) | |
*/ | |
add_action( 'wp_head', 'bryce_clear_cart' ); | |
function bryce_clear_cart() { | |
if ( wc_get_page_id( 'cart' ) == get_the_ID() || wc_get_page_id( 'checkout' ) == get_the_ID() ) { | |
return; | |
} |