WordPress filter hook

cryptocurrency_product_for_woocommerce_wp_localize_script

Defined by Cryptocurrency Product for WooCommerce and fired by 3 plugins in total, running on 20+ sites between them.

“Filters the payload handed to the admin script.”

How to use cryptocurrency_product_for_woocommerce_wp_localize_script

It's a filter: your callback receives the value, and must return the (changed) value. Add this to your theme's functions.php or a small custom plugin:

functions.php
add_filter( 'cryptocurrency_product_for_woocommerce_wp_localize_script', function( $value ) {
	// Change $value here.
	return $value;
}, 10, 1 );

Argument names come from Cryptocurrency Product for WooCommerce's source. Other plugins may pass different values: check the call in the plugin you're targeting below.

3 plugins that fire cryptocurrency_product_for_woocommerce_wp_localize_script

Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.

  1. Ultimate Downloadable Products for WooCommerce icon Ultimate Downloadable Products for WooCommerce10+ installs apply_filters( 'cryptocurrency_product_for_woocommerce_wp_localize_script', [] ) app/Infrastructure/Assets.php:208
  2. Cryptocurrency Product for WooCommerce icon Cryptocurrency Product for WooCommerce10+ installs apply_filters( 'cryptocurrency_product_for_woocommerce_wp_localize_script', [ 'web3Endpoint' => esc_html( CRYPTOCURRENCY_PRODUCT_FOR_WOOCOMMERCE_getWeb3Endpoint() ), 'walletAddress' => esc_html( $thisWalletAddress ), ] ) cryptocurrency-product-for-woocommerce.eth.php:2769
  3. Total Cost Input for WooCommerce icon Total Cost Input for WooCommerceFewer than 10 installs apply_filters( 'cryptocurrency_product_for_woocommerce_wp_localize_script', $payload ) app/Infrastructure/Assets.php:283

Need a customisation built on this hook?

Tell us what you want to change and which plugin it's for. We'll write it, test it and send it back as a small plugin.