Require Downloadable fields – Downloadable product template

add_filter( ‘wcvendors_pro_product_form_download_files_path’, ‘make_required’ ); add_filter( ‘wcvendors_pro_product_form_product_attributes_path’, ‘make_required’ ); add_filter( ‘wcv_product_dowlnoad_limit’, ‘make_required’ ); add_filter( ‘wcv_product_download_expiry’, ‘make_required’ ); function make_required( $field ){ $field[‘custom_attributes’] = array( ‘required’ => ” ); return $field; }Continue reading

Change Add Product button URL

add_filter( ‘wcv_dashboard_quick_links’, ‘change_add_product_link’ ); /** * Change the add product link * * @param array $links The links. */ function change_add_product_link( $links ) { if ( isset( $links[‘product’] ) ) { $links[‘product’][‘url’] = ‘https://example.com/add-product/’; $links[‘product’][‘label’] = __( ‘Add Product’, ‘wc-vendors’…Continue reading

Reorder dashboard navigation

/** * Bring the order page to the front of the product page * * @param array $pages The pages. */ function add_test_page_nav( $pages ) { $order_page = array(); if ( isset( $pages[‘order’] ) ) { $order_page = $pages[‘order’]; unset(…Continue reading

Set the Payment fields in the Sign Up form as required

add_filter(‘wcv_vendor_paypal_address’, ‘wcv_set_payment_field_required’); add_filter(‘wcv_vendor_paypal_venmo’, ‘wcv_set_payment_field_required’); add_filter(‘wcv_vendor_bank_account_name’, ‘wcv_set_payment_field_required’); add_filter(‘wcv_vendor_bank_account_number’, ‘wcv_set_payment_field_required’); add_filter(‘wcv_vendor_bank_name’, ‘wcv_set_payment_field_required’); add_filter(‘wcv_vendor_bank_routing_number’, ‘wcv_set_payment_field_required’); add_filter(‘wcv_vendor_bank_bic_swift’, ‘wcv_set_payment_field_required’); /** * Add required attribute to payment fields * * @param array $payment_field The input field to modify. * * @return array $payment_field The modified input…Continue reading

The commission is only log when the order status is completed

if ( ! function_exists( ‘wcv_log_commission_order_status’ ) ) { /** * Log commission when order status is ? * * @param array $order_statuses The order statuses. * @return array */ function wcv_log_commission_order_status( $order_statuses ) { $key = array_search( ‘processing’, $order_statuses, true…Continue reading

Change the action’s string in the refund section – “View Details”

add_filter(‘wcvendors_pro_table_rows_wcv_refund_request’, ‘change_refund_actions_labels’); function change_refund_actions_labels( $rows ) { foreach ( $rows as $row ) { // Add filter to change the label for row with row ID. add_filter(‘wcv_refund_request_row-actions_’ . $row->ID, ‘change_refund_action_label’); } return $rows; } function change_refund_action_label( $actions ) { $actions[‘view_details’][‘label’]…Continue reading

Change the “Commission” header for the Recent Orders table

add_filter( ‘wcvendors_recent_order_table_columns’, ‘change_commission_label’ ); /** * Change the label of the commission column * * @param array $columns The columns to display. * * @return array */ function change_commission_label( $columns ) { $columns[‘commission’] = __( ‘Fees’, ‘wcvendors-pro’ ); return $columns;…Continue reading