Search
 
SCRIPT & CODE EXAMPLE
 

PHP

redirect woocommerce thank you

add_action( 'woocommerce_thankyou', 'woocommerce_custom_thank_you_page');
  
function woocommerce_custom_thank_you_page( $order_id ){
    $order = wc_get_order( $order_id );
    $url = 'https://yoursite.com/custom-page-url';
    if ( ! $order->has_status( 'failed' ) ) {
        wp_safe_redirect( $url );
        exit;
    }
}
Comment

woocommerce thank you page

/**
 * @snippet       WooCommerce add text to the thank you page
 * @how-to        Get CustomizeWoo.com FREE
 * @author        Rodolfo Melogli
 * @testedwith    WooCommerce 4.5
 */
  
add_action( 'woocommerce_thankyou', 'bbloomer_add_content_thankyou' );
  
function bbloomer_add_content_thankyou() {
   echo '<p>Some HTML content!</p>';
}
Comment

PREVIOUS NEXT
Code Example
Php :: download file php 
Php :: scribe laravel 
Php :: word press get home page id 
Php :: php datetime sub minutes 
Php :: php date add days 
Php :: show data from a table in laravel 8 
Php :: laravel joins 
Php :: alerta con php 
Php :: call php from html 
Php :: Laravel retrieving single record 
Php :: set unique value validation for laravel form request 
Php :: create project laravel 
Php :: store emoji in php 
Php :: php sort multidimensional array by value 
Php :: php auto redirect 
Php :: foreach reverse laravel 
Php :: insert data in database using seeder in laravel 
Php :: print hello world in php 
Php :: laravel middleware route 
Php :: base64 enocode php 
Php :: live update mysql data in php 
Php :: exec output php 
Php :: laravel request except multiple 
Php :: php artisan tinker send email 
Php :: option selected in laravel blade 
Php :: HTML5 Date Valu In PHP 
Php :: update role spatie 
Php :: foreach skip current iteration 
Php :: laravel httaccess for apache 
Php :: laravel passport get tokenId 
ADD CONTENT
Topic
Content
Source link
Name
9+4 =