Skip to content

For Developers

Controls whether the certification widget should be displayed.

add_filter( 'wpify_woo_heureka_render_widget', function( $render ) {
// Do not display widget on specific pages
if ( is_page( 'landing-page' ) ) {
return false;
}
return $render;
} );
ParameterTypeDescription
$renderbooltrue to display, false to hide

Returns: bool


Allows blocking data submission to Heureka for a specific order.

add_filter( 'wpify_woo_heureka_disable_send', function( $disable, $order ) {
// Do not send for B2B orders
if ( $order->get_meta( '_is_b2b_order' ) ) {
return true;
}
return $disable;
}, 10, 2 );
ParameterTypeDescription
$disablebooltrue to block sending
$orderWC_OrderOrder object

Returns: bool


Controls whether to add the opt-out checkbox to checkout.

add_filter( 'wpify_woo_heureka_add_optout', function( $add_optout ) {
// Do not add opt-out for registered customers
if ( is_user_logged_in() ) {
return false;
}
return $add_optout;
} );
ParameterTypeDescription
$add_optoutbooltrue to add checkbox

Returns: bool


Modifies the product ID sent to Heureka.

add_filter( 'wpify_woo_heureka_overeno_item_id', function( $item_id, $item, $order ) {
// Use SKU instead of ID
$product = $item->get_product();
if ( $product && $product->get_sku() ) {
return $product->get_sku();
}
return $item_id;
}, 10, 3 );
ParameterTypeDescription
$item_idstringProduct ID
$itemWC_Order_Item_ProductOrder item
$orderWC_OrderOrder object

Returns: string


Modifies the complete data sent to Heureka.

add_filter( 'wpify_woo_heureka_overeno_data', function( $data, $order ) {
// Add custom data
$data['custom_field'] = 'value';
return $data;
}, 10, 2 );
ParameterTypeDescription
$dataarrayData for sending
$orderWC_OrderOrder object

Returns: array

Data structure:

[
'email' => 'customer@email.com',
'order_id' => 12345,
'products' => [
['id' => 'SKU123', 'name' => 'Product name'],
// ...
]
]

Displays reviews from Heureka.

[wpify_woo_heureka_reviews count="6" widget="1" button_text="" button_url=""]
AttributeDefaultDescription
count6Number of reviews
widget1Widget (1) or list (0)
button_textemptyButton text
button_urlemptyButton URL

Stores the customer’s choice regarding opt-out/opt-in.

// Getting the value
$optout = $order->get_meta( '_wpify_woo_heureka_optout_agreement' );
// Values:
// '1' or 'yes' - customer checked the checkbox
// empty - customer did not check the checkbox

Logic:

  • Opt-out mode: If the value is 1/yes, the survey is not sent
  • Opt-in mode: If the value is 1/yes, the survey is sent

The module supports logging for diagnostics. Logs are saved to:

wp-content/uploads/wpify-woo-logs/heureka-overeno-*.log

Logs contain:

  • Successful submissions to Heureka
  • API communication errors
  • Opt-out choice information

The module fully supports WooCommerce block checkout. The opt-out checkbox is automatically integrated into the block checkout using the WooCommerce Store API.