Hi @slash1andy,
thanks for having a look at my page! Now that’s strange!
Here is a screen shot of my page after clicking the orange button:
https://www.awesomescreenshot.com/showImage?img_id=3991548
As mentioned, this is a dummy page, but it’s the same on my site translated to German. I’m afraid that I will lose customers, when this unnecessary popup sometimes will show up? How to get rid of it altogether anyway, if I can’t find a way to translate it?
At least I found where this confirmation box is, but I’m not sure what to change there without ruining the whole thing?
Plugin:
<?php
/*
Plugin Name: Sellosity Express Checkout
Version: 1.0.8
Description: This addon for Sellosity allows you to add express checkout options for your store and also provides the ability to create 1-click upsell links and buttons to dramatically increase your profits per order
Plugin URI: https://sellosity.com/
Author: Sellosity
Author URI: https://sellosity.com/
*/
require_once(trailingslashit(dirname(__FILE__)).’sellosity-updater.php’);
new WPUpdatesPluginUpdater_1500( ‘https://wp-updates.com/api/2/plugin’, plugin_basename(__FILE__));
add_action(‘template_redirect’, function() {
if( !isset( $_GET[‘one-click-order’] ) ) {
return;
}
$id = absint($_GET[‘one-click-order’]);
$qty = isset($_GET[‘qty’]) ? absint($_GET[‘qty’]) : 1;
$coupon = isset($_GET[‘coupon’]) ? $_GET[‘coupon’] : ”;
$variation = isset($_GET[‘variation’]) ? json_decode( $_GET[‘variation’], $as_array = true ) : ”;
one_click_order( $id, $variation, $qty, $coupon );
});
add_filter(‘woocommerce_create_account_default_checked’ , function ($checked){
return true;
});
add_action(‘wp_enqueue_scripts’, function(){
wp_register_script( ‘express_checkout_product’, plugin_dir_url( __FILE__ ) . ‘assets/js/product.js’, array(‘jquery’), ‘1.0.8’ );
wp_register_script( ‘express_checkout_shortcode’, plugin_dir_url( __FILE__ ) . ‘assets/js/short.js’, array(‘jquery’), ‘1.0.8’ );
wp_register_style( ‘express_checkout_confirmation’, plugin_dir_url( __FILE__ ) . ‘assets/css/confirmation.css’ );
wp_enqueue_style( ‘express_checkout_confirmation’ );
// This is a product page
if( is_product() && is_one_click_order_active() ) {
$should_be_confirmed = should_be_confirmed();
wp_enqueue_script( ‘express_checkout_product’ );
wp_localize_script(‘express_checkout_product’, ‘express_checkout’, array( ‘should_be_confirmed’ => $should_be_confirmed ) );
}
});
require_once(‘logic.php’);
require_once(‘admin-panel.php’);
require_once(‘woocommerce-hooks.php’);