Product Settings - Filter Hook References

Modified on Thu, 09 Feb 2023 at 11:48 PM

This is simply a list of product settings related filter hooks included in the WooCommerce Catalog Mode - Pricing, Enquiry Forms & Promotions files. This list also includes the supported parameters and example codes.


wmodes-admin/product-options/get-option-type-groups

  • Parameters:
  • $group_types array()
  • $args array()


Example Codes:

function custom_get_option_type_groups( $group_types, $args ) {

    //add your custom code here
    return $group_types;
}

add_filter( 'wmodes-admin/product-options/get-option-type-groups', 'custom_get_option_type_groups', 10, 2 );

wmodes-admin/product-options/get-{group_type_id}-option-types

  • Parameters:
  • $option_types array()
  • $args array()


Example Codes:

function custom_get_group_type_id_option_types( $option_types, $args ) {

    //add your custom code here
    return $option_types;
}

add_filter( 'wmodes-admin/product-options/get-{group_type_id}-option-types', 'custom_get_group_type_id_option_types', 10, 2 );

wmodes-admin/product-options/get-option-type-{option_type_id}-fields

  • Parameters:
  • $fields array()
  • $args array()


Example Codes:

function custom_get_option_type_option_type_id_fields( $fields, $args ) {

    //add your custom code here
    return $fields;
}

add_filter( 'wmodes-admin/product-options/get-option-type-{option_type_id}-fields', 'custom_get_option_type_option_type_id_fields', 10, 2 );

wmodes-admin/product-options/get-type-requires-ex-products

  • Parameters:
  • $option_type_ids array()
  • $args array()


Example Codes:

function custom_get_type_requires_ex_products( $option_type_ids, $args ) {

    //add your custom code here
    return $option_type_ids;
}

add_filter( 'wmodes-admin/product-options/get-type-requires-ex-products', 'custom_get_type_requires_ex_products', 10, 2 );

wmodes-admin/product-options/get-type-requires-variations

  • Parameters:
  • $option_type_ids array()
  • $args array()


Example Codes:

function custom_get_type_requires_variations( $option_type_ids, $args ) {

    //add your custom code here
    return $option_type_ids;
}

add_filter( 'wmodes-admin/product-options/get-type-requires-variations', 'custom_get_type_requires_variations', 10, 2 );

wmodes/product-options/process-{option_type_id}-option

  • Parameters:
  • $option array()
  • $option_args array()
  • $args array()


Example Codes:

function custom_process_option_type_id_option( $option, $option_args, $data ) {

    //add your custom code here
    return $option;
}

add_filter( 'wmodes/product-options/process-{option_type_id}-option', 'custom_process_option_type_id_option', 10, 3 );


Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons

Feedback sent

We appreciate your effort and will try to fix the article