Categories
WP User Frontend

How to charge different amount for different post type using WP User Frontend subscription pack

Here is the guideline for charging a different amount for different post types.

1) Navigate to wp-admin > User Frontend > Subscription. Click on Add New Subscription button to add new subscription.

2) Now, You can see the fields to enter the number for each post.

3) If you want to allow only one post type for that pack then enter the number for that post type field, keep value 0 for other post types.

3) Click on “Publish” button to publish that pack.

All done, now users can only submit to that specific post type after purchasing this pack.

Categories
Dokan Multivendor Plugins

How can redirect to the “seller dashboard” instead of seller setup wizard

To define the seller dashboard page instead of setup wizard after registering as a new seller, you can add the following code to your theme’s functions.php file.

Note: This is a Developer level doc. If you are unfamiliar with code/templates and resolving potential conflicts, contact me for assistance.
// define the seller dashboard page instead of setup wizard to redirect after registering as a new seller.
add_filter( 'woocommerce_registration_redirect', 'custom_woocommerce_registration_redirect', 11, 1 );
function custom_woocommerce_registration_redirect( $var ) {
    $url  = $var;
    $user = wp_get_current_user();

    if ( in_array( 'seller', $user->roles ) ) {
        $url = dokan_get_navigation_url('/dashboard');
    }


    return $url;
}
Categories
Plugins WooCommerce

How to display quantity input fields next to add to cart buttons.

To display quantity input fields for simple products within your shop archive pages, you can add the following code to your theme’s functions.php file.

Note: This is a Developer level doc. If you are unfamiliar with code/templates and resolving potential conflicts, contact me for assistance.
<?php
/**
 * Code should be placed in your theme functions.php file.
 */

add_filter( 'woocommerce_loop_add_to_cart_link', 'quantity_inputs_for_woocommerce_loop_add_to_cart_link', 10, 2 );
function quantity_inputs_for_woocommerce_loop_add_to_cart_link( $html, $product ) {
    if ( $product && $product->is_type( 'simple' ) && $product->is_purchasable() && $product->is_in_stock() && ! $product->is_sold_individually() ) {
        $html = '<form action="' . esc_url( $product->add_to_cart_url() ) . '" class="cart" method="post" enctype="multipart/form-data">';
        $html .= woocommerce_quantity_input( array(), $product, false );
        $html .= '<button type="submit" class="button alt">' . esc_html( $product->add_to_cart_text() ) . '</button>';
        $html .= '</form>';
    }
    return $html;
}
Categories
WordPress

How to Identify a Conflicting Theme or Plugin

weDevs use WordPress’ best practices to make it as compatible as possible with all themes and plugins; however, some theme and plugin authors do not adhere to these best practices which can often result in a theme or plugin conflict with our plugins

The following section provides instructions for determining if an issue you are experiencing with our plugin is caused by a theme or plugin conflict.

1. Theme Test
=> Switch to the default WordPress theme as we know that the default WordPress theme is coded properly. Now check and see if the issue is still there. Take note if you see a difference in behavior after you have switched the theme. Switch back to the theme you were using.

2. Plugin Test
If the theme didn’t have anything to do with the issue then move on to the plugins section. There are many WordPress plugins out there and not all of them are coded nicely so let’s see if you have a plugin installed that is not playing nice.

=> Try to deactivate the plugins except for our plugins then check again.

Does the issue remain?

If not, the issue is not caused by our plugin. This may be a WordPress issue, a conflict with your specific setup or something related to your server or webhost. Opening a topic in the WordPress support forums may help point you in the right direction.

If not, continue.

If yes, the issue is caused by our plugin. Create a support ticket on weDevs site for advice.