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 code below to Chrome inspector Console tab */ | |
var all = document.getElementsByTagName("*"), i = 0, rect, docWidth = document.documentElement.offsetWidth; | |
for (; i < all.length; i++) { | |
rect = all[i].getBoundingClientRect(); | |
if (rect.right > docWidth || rect.left < 0){ | |
console.log(all[i]); | |
all[i].style.borderTop = '1px solid red'; | |
} | |
} |
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
[ajax_load_more post_type="goric_products" posts_per_page="15" images_loaded="true" lazy_images="true" transition="masonry" masonry_selector=".grid-item" masonry_animation="slide-up"] | |
<div class="alm-item<?php if (!has_post_thumbnail()) { ?> no-img<?php } ?> grid-item"> | |
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"> | |
<?php if ( has_post_thumbnail() ) { the_post_thumbnail('large', array( 'width' => 300, 'height' => 200 )); }?> | |
<h4><?php the_title(); ?></h4> | |
</a> | |
</div> |
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
$query = new WC_Order_Query( array( | |
'limit' => -1, | |
'return' => 'ids', | |
) ); | |
$orders = $query->get_orders(); | |
foreach ( $orders as $order_id ) { | |
$order = new WC_Order( $order_id ); | |
if ( ! empty( $order ) ) { | |
$order->update_status( 'processing' ); | |
} |
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
<?php | |
// limit number of products for each run to not overburden the server | |
$args = array( | |
'limit' => 10, | |
'offset' => 0, | |
'return' => 'ids', | |
); | |
$product_ids = wc_get_products( $args ); | |
// loop through products | |
foreach ( $product_ids as $product_id ) : |