Search
 
SCRIPT & CODE EXAMPLE
 

PHP

without login cant purchase woocommerce

/**
 * @snippet       Pay for Order if Logged Out - WooCommerce Checkout
 * @how-to        Get CustomizeWoo.com FREE
 * @author        Rodolfo Melogli
 * @compatible    WooCommerce 3.6.2
 * @donate $9     https://businessbloomer.com/bloomer-armada/
 */
 
add_filter( 'user_has_cap', 'bbloomer_order_pay_without_login', 9999, 3 );
 
function bbloomer_order_pay_without_login( $allcaps, $caps, $args ) {
   if ( isset( $caps[0], $_GET['key'] ) ) {
      if ( $caps[0] == 'pay_for_order' ) {
         $order_id = isset( $args[2] ) ? $args[2] : null;
         $order = wc_get_order( $order_id );
         if ( $order ) {
            $allcaps['pay_for_order'] = true;
         }
      }
   }
   return $allcaps;
}
Comment

PREVIOUS NEXT
Code Example
Php :: how to make:trait in commend line in laravel 
Php :: PHP OOP - Access Modifiers 
Php :: php curl upload linkedin image 
Php :: php spellchecker 
Php :: bitnami wp user pass change 
Php :: php random array name 
Php :: create newfilter wordpress 
Php :: Ajouter un texte par défaut sur toutes vos publications WordPress 
Php :: publish algolia search in laravel 
Php :: wordpress get posts by multiple authors 
Php :: auto complete order paid 
Php :: __sleep and __wakeup 
Php :: if ( $post_armi-have_posts() ) { while ($post_armi-have_posts() ) { $post_armi-the_post(); 
Php :: model coomad laravel 
Php :: php pdo connect to database 
Php :: smarty shorthand if 
Php :: wordpress add menu frontend 
Php :: laravel excel check for duplicates 
Php :: DateTimeZone not found laravel 
Php :: laravel check if postback 
Php :: how to increment a number after concatinating it with a date function in php 
Php :: drop down list display only seleted item only 
Php :: SET DEFAULT hide title astra wordpress 
Php :: bootstrap autocomplete example ajax php mysql 
Php :: yoast seo alternative for laravel 
Php :: php usort two columns 
Php :: how to check my server use cgi, fcgi or fpm. 
Php :: php clear echo messages 
Php :: laravel request allFiles 
Php :: php get header language 
ADD CONTENT
Topic
Content
Source link
Name
6+3 =