WordPress filter hook

wpml_original_element_id

Fired by 23 WordPress plugins, running on 491K+ sites between them.

How to use wpml_original_element_id

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

functions.php
add_filter( 'wpml_original_element_id', function( $value, $post_id ) {
	// Change $value here.
	return $value;
}, 10, 2 );

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

23 plugins that fire wpml_original_element_id

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

  1. PixelYourSite icon PixelYourSite400,000+ installs apply_filters( 'wpml_original_element_id', NULL, $product_id ) includes/functions-common.php:2319
  2. Checkout Field Editor for WooCommerce icon Checkout Field Editor for WooCommerce20,000+ installs apply_filters( 'wpml_original_element_id', null, $post_id ) includes/class-awcfe-ml.php:80
  3. Price Based on Country for WooCommerce icon Price Based on Country for WooCommerce20,000+ installs apply_filters( 'wpml_original_element_id', null, $object_id ) includes/integrations/class-wcpbc-wpml.php:69
  4. MasterStudy LMS WordPress Plugin icon MasterStudy LMS WordPress Plugin10,000+ installs apply_filters( 'wpml_original_element_id', null, $course_id, 'post_' . PostType::COURSE ) _core/lms/classes/course.php:554
  5. SmartCrawl SEO checker, analyzer & optimizer icon SmartCrawl SEO checker, analyzer & optimizer10,000+ installs apply_filters( 'wpml_original_element_id', null, $wp_post->ID, 'post_' . $wp_post->post_type ) includes/core/entities/class-post.php:600
  6. Tiered Pricing Table for WooCommerce icon Tiered Pricing Table for WooCommerce10,000+ installs apply_filters( 'wpml_original_element_id', null, $postId, 'post_product' ) src/Integrations/Plugins/WPMLMultilingual.php:68
  7. Sensei LMS icon Sensei LMS9,000+ installs apply_filters( 'wpml_original_element_id', null, $course_id, 'post_course' ) includes/internal/emails/generators/class-course-welcome.php:155
  8. Classified Listing icon Classified Listing8,000+ installs apply_filters( 'wpml_original_element_id', $post_id, 'post_' . $post_type ) app/Helpers/Functions.php:6975
  9. MKL Product Configurator for WooCommerce icon MKL Product Configurator for WooCommerce2,000+ installs apply_filters( 'wpml_original_element_id', null, $post_id, 'post_product' ) inc/languages.php:81
  10. Zakeke Interactive Product Designer for WooCommerce icon Zakeke Interactive Product Designer for WooCommerce1,000+ installs apply_filters( 'wpml_original_element_id', null, $product_id, 'post_product' ) includes/support/class-wpml.php:38
  11. SaveTo Wishlist Lite icon SaveTo Wishlist Lite600+ installs apply_filters( 'wpml_original_element_id', null, $post->ID, 'post_page' ) Classes/Frontend/Wishlist.php:717
  12. fullPage Vertical & Horizontal Slider icon fullPage Vertical & Horizontal Slider300+ installs apply_filters( 'wpml_original_element_id', null, $id, 'post_' . \get_post_type( $id ) ) models/page-settings.php:370
  13. Hotel Booking for WooCommerce icon Hotel Booking for WooCommerce100+ installs apply_filters( 'wpml_original_element_id', null, $tt_id, 'tax_rate_plan' ) includes/hbfwc-functions.php:89
  14. Extra Product Options (Custom Addons) for WooCommerce icon Extra Product Options (Custom Addons) for WooCommerce100+ installs apply_filters( 'wpml_original_element_id', null, $post_id ) App/Helpers/WPML.php:39
  15. Verowa Connect icon Verowa Connect100+ installs apply_filters( 'wpml_original_element_id', null, $i_post_id, 'post_' . $str_post_type ) functions/general.php:582
  16. Massoftind Custom Fields & Field Builder icon Massoftind Custom Fields & Field Builder10+ installs apply_filters( 'wpml_original_element_id', null, $term_id, $element_type ) helpers/WpmlSupport.php:1736
  17. Reviewbird Product Reviews for WooCommerce icon Reviewbird Product Reviews for WooCommerce10+ installs apply_filters( 'wpml_original_element_id', $original_id, $product_id, 'post_' . get_post_type( $product_id ) ) src/Integration/WPML.php:72
  18. Sellinor Expiration & Best Before Dates for WooCommerce icon Sellinor Expiration & Best Before Dates for WooCommerceFewer than 10 installs apply_filters( 'wpml_original_element_id', null, $product_id, 'post_' . $type ) includes/class-multilingual.php:71
  19. ErreD EU Order Withdrawal for WooCommerce icon ErreD EU Order Withdrawal for WooCommerceFewer than 10 installs apply_filters( 'wpml_original_element_id', null, $product_id, 'post_product' ) src/Integration/Multilingual.php:43
  20. AutoROICalc Event Tracking icon AutoROICalc Event TrackingFewer than 10 installs apply_filters( 'wpml_original_element_id', null, $document_id, 'post_' . $post_type ) includes/class-autoroicalc-event-tracking-wpml.php:138
  21. Optimi AI Search icon Optimi AI SearchFewer than 10 installs apply_filters( 'wpml_original_element_id', null, $postId, 'post_' . $postType ) includes/languages.php:195
  22. Neatplug Notify for Telegram icon Neatplug Notify for TelegramFewer than 10 installs apply_filters( 'wpml_original_element_id', null, $form_id, 'post_' . self::POST_TYPE ) includes/integrations/class-contact-form-7.php:141
  23. ProofPass icon ProofPassFewer than 10 installs apply_filters( 'wpml_original_element_id', null, $id, $type ) includes/class-proofpass-woocommerce.php:401

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.