Example #1
0
 public function hookdisplayPayment()
 {
     //check PWA is enable if yes then show Pay With Amazon button on cart page
     if (Configuration::get('PWAPRESTA_PWAPRESTA_ENABLE')) {
         if (!defined('PWA_MODULE_DIR')) {
             define('PWA_MODULE_DIR', dirname(__FILE__));
         }
         include_once 'includes/class-pwapresta.php';
         $cba = new PWA_Cba();
         return $cba->pay_with_amazon_button('checkout');
     }
 }
Example #2
0
 public function add_button_before_placeorder()
 {
     wp_enqueue_script('pwa_script', plugins_url('./assests/js/script.js', __FILE__), false, '1.0.0', 'all');
     $cba = new PWA_Cba();
     $cba->pay_with_amazon_button();
     /*$pwacheckkout = new Pwacheckout();
     		if( $pwacheckkout->get_option('show_pwa_button') == 'yes'){
     			if ( is_user_logged_in() )
     			{
     				$cba = new PWA_Cba();
     				$cba->pay_with_amazon_button();
     			}
     		}
     		else{
     				//echo "user not logged in";
     				$cba = new PWA_Cba();
     				$cba->pay_with_amazon_button();
     		}*/
 }