Others - Filter Hook References

Modified on Sun, 1 Oct, 2023 at 9:27 AM

This is simply a list of other filter hooks that can be found within the WooCommerce Partial COD - Payment Gateway Restrictions & Fees files. This list also includes the supported parameters and example codes.


woopcd_partialcod-admin/get-method-{method_id}-props

  • Parameters:
  • $method_props array()


Example Codes:

function custom_get_method_props( $method_props ) {

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

add_filter( 'woopcd_partialcod-admin/get-method-{method_id}-props', 'custom_get_method_props', 10, 1 );

woopcd_partialcod-admin/get-settings-section-fields

  • Parameters:
  • $fields array()


Example Codes:

function custom_get_settings_section_fields( $fields ) {

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

add_filter( 'woopcd_partialcod-admin/get-settings-section-fields', 'custom_get_settings_section_fields', 10, 1 );

woopcd_partialcod/partial-payment/get-method-ids

  • Parameters:
  • $method_ids array()


Example Codes:

function custom_get_method_ids( $method_ids ) {

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

add_filter( 'woopcd_partialcod/partial-payment/get-method-ids', 'custom_get_method_ids', 10, 1 );

woopcd_partialcod/is_email

  • Parameters:
  • $is_email bool


Example Codes:

function custom_get_is_email( $is_email ) {

    //add your custom code here
    return $is_email; // true or false
}

add_filter( 'woopcd_partialcod/is_email', 'custom_get_is_email', 10, 1 );

woopcd_partialcod/is_db_order_total

  • Parameters:
  • $is_db_order_total bool


Example Codes:

function custom_get_is_db_order_total( $is_db_order_total ) {

    //add your custom code here
    return $is_db_order_total; // true or false
}

add_filter( 'woopcd_partialcod/is_db_order_total', 'custom_get_is_db_order_total', 10, 1 );

woopcd_partialcod/can_adjust_cart_total

  • Parameters:
  • $can_adjust_cart_total bool


Example Codes:

function custom_can_adjust_cart_total( $can_adjust_cart_total ) {

    //add your custom code here
    return $can_adjust_cart_total; // true or false
}

add_filter( 'woopcd_partialcod/can_adjust_cart_total', 'custom_can_adjust_cart_total', 10, 1 );

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 at least one of the reasons

Feedback sent

We appreciate your effort and will try to fix the article