How would I Redirect an existing WooCommerce customer to a specific url after Checkout

The following should suffice. It will redirect to your custom URL only if the order has not failed. add_action( ‘woocommerce_thankyou’, ‘ii_redirect_thankyou’); function ii_redirect_thankyou( $order_id ){ $customer_orders = get_posts( array( ‘numberposts’ => 2, // getting 2 as by the time this purchase has happened the count will be 1. ‘meta_key’ => ‘_customer_user’, ‘meta_value’ => get_current_user_id(), ‘post_type’ … Read more

Error datatable whit ajax

sorry. I’m very sorry, I could already solve. I have my local wordpress installation in a site.test/wordpress/ subfolder and in the ajax I make the request without the subfolder. I still have the doubt about the numbers that are added at the end of the url. :/

Get all image in media Gallery with alt/title?

<?php /* * Template Name: Gallery Page */ $query_images_args = array( ‘post_type’ => ‘attachment’, ‘post_mime_type’ => ‘image’, ‘post_status’ => ‘inherit’, ‘posts_per_page’ => – 1, ); $query_images = new WP_Query( $query_images_args ); ?> <?php get_header();?> <div class=”main”> <div class=”row”> <?php foreach ( $query_images->posts as $image ) {?> <div class=”col-md-3″> <?php echo wp_get_attachment_image( $image->ID,’thumbnail’ );?> </div> <?php … Read more