Skip to content

Commit

Permalink
fix: addes some hooks for extend extra features
Browse files Browse the repository at this point in the history
  • Loading branch information
sabbir1991 committed Nov 7, 2019
1 parent 92948fa commit 9d1da0c
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion assets/js/dokan.js
Original file line number Diff line number Diff line change
Expand Up @@ -1316,7 +1316,7 @@ jQuery(function($) {
var hide_classes = '.hide_if_downloadable, .hide_if_virtual';
var show_classes = '.show_if_downloadable, .show_if_virtual';

$.each( [ 'simple', 'variable', 'grouped' ], function( index, value ) {
$.each( Object.keys( dokan.product_types ), function( index, value ) {
hide_classes = hide_classes + ', .hide_if_' + value;
show_classes = show_classes + ', .show_if_' + value;
});
Expand Down
2 changes: 1 addition & 1 deletion assets/src/js/product-editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -766,7 +766,7 @@
var hide_classes = '.hide_if_downloadable, .hide_if_virtual';
var show_classes = '.show_if_downloadable, .show_if_virtual';

$.each( [ 'simple', 'variable', 'grouped' ], function( index, value ) {
$.each( Object.keys( dokan.product_types ), function( index, value ) {
hide_classes = hide_classes + ', .hide_if_' + value;
show_classes = show_classes + ', .show_if_' + value;
});
Expand Down
1 change: 1 addition & 0 deletions includes/class-assets.php
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,7 @@ public function enqueue_front_scripts() {
'commission_type' => dokan_get_commission_type( dokan_get_current_user_id() ),
'rounding_precision' => wc_get_rounding_precision(),
'mon_decimal_point' => wc_get_price_decimal_separator(),
'product_types' => apply_filters( 'dokan_product_types', [ 'simple' ] ),
);

$localize_script = apply_filters( 'dokan_localized_args', $default_script );
Expand Down
1 change: 0 additions & 1 deletion includes/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -892,7 +892,6 @@ function dokan_get_template_part( $slug, $name = '', $args = array() ) {

// Allow 3rd party plugin filter template file from their plugin
$template = apply_filters( 'dokan_get_template_part', $template, $slug, $name );

if ( $template ) {
include( $template );
}
Expand Down
2 changes: 2 additions & 0 deletions templates/products/new-product-single.php
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,8 @@ class="vendor-earning simple-product"
</div><!-- .sale-schedule-container -->
</div>

<?php do_action( 'dokan_product_edit_after_pricing', $post, $post_id ); ?>

<?php if ( dokan_get_option( 'product_category_style', 'dokan_selling', 'single' ) == 'single' ): ?>
<div class="dokan-form-group">
<label for="product_cat" class="form-label"><?php esc_html_e( 'Category', 'dokan-lite' ); ?></label>
Expand Down

0 comments on commit 9d1da0c

Please sign in to comment.