• Hi

    We’ve set a limit of £1000 to use Clearpay which works fine.

    Is there a way to remove the Clearpay logo and…
    “available for orders between £1 – £1,000”
    text from products over this amount?

    Thanks

Viewing 1 replies (of 1 total)
  • Plugin Author Clearpay

    (@clearpayit)

    Hi @samgardiner,

    Thank you for your message.

    To modify the output of the plugin, the Clearpay hook clearpay_is_product_supported can be used as documented here: https://developers.clearpay.com/docs/woocommerce-hooks. For example the below code may fit the requirements.

    function clearpay_ips_callback( $bool_result, $product ) {
    	$product_price = wc_get_price_including_tax( $product );
    	if( 1 > $product_price || $product_price > 1000 ) {
    
    		return false;
    	}
    
    	return $bool_result;
    }
    add_filter( 'clearpay_is_product_supported', 'clearpay_ips_callback', 10, 2 );

    The above code can be added to the functions.php file. A child theme should be used to do this if the site theme receives updates. Clearpay also recommends testing code changes on a staging site first, as well as taking a full backup before making any changes to a live site.

    Thank you.

Viewing 1 replies (of 1 total)
  • The topic ‘Remove Clearpay from ineligible products’ is closed to new replies.