Music Player for WooCommerce - Version 1.0.127

Version Description

  • Adds a new attribute in the playlist shortcode to hide the products' prices and add-to-cart icons: hide_purchase_buttons
Download this release

Release Info

Developer codepeople
Plugin Icon 128x128 Music Player for WooCommerce
Version 1.0.127
Comparing to
See all releases

Code changes from version 1.0.126 to 1.0.127

Files changed (2) hide show
  1. readme.txt +5 -1
  2. wcmp.php +5 -4
readme.txt CHANGED
@@ -200,6 +200,10 @@ Each time save the data of a product, the files for demo are deleted and generat
200
 
201
  == Changelog ==
202
 
 
 
 
 
203
  = 1.0.126 =
204
 
205
  * Modifies the playlist shortcode to allow inserting the player in products' pages.
@@ -737,6 +741,6 @@ Each time save the data of a product, the files for demo are deleted and generat
737
 
738
  == Upgrade Notice ==
739
 
740
- = 1.0.126 =
741
 
742
  Important note: If you are using the Professional version don't update via the WP dashboard but using your personal update link. Contact us if you need further information: http://wordpress.dwbooster.com/support
200
 
201
  == Changelog ==
202
 
203
+ = 1.0.127 =
204
+
205
+ * Adds a new attribute in the playlist shortcode to hide the products' prices and add-to-cart icons: hide_purchase_buttons
206
+
207
  = 1.0.126 =
208
 
209
  * Modifies the playlist shortcode to allow inserting the player in products' pages.
741
 
742
  == Upgrade Notice ==
743
 
744
+ = 1.0.127 =
745
 
746
  Important note: If you are using the Professional version don't update via the WP dashboard but using your personal update link. Contact us if you need further information: http://wordpress.dwbooster.com/support
wcmp.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  Plugin Name: Music Player for WooCommerce
4
  Plugin URI: https://wcmp.dwbooster.com
5
- Version: 1.0.126
6
  Text Domain: music-player-for-woocommerce
7
  Author: CodePeople
8
  Author URI: https://wcmp.dwbooster.com
@@ -417,7 +417,7 @@ if ( !class_exists( 'WooCommerceMusicPlayer' ) ) {
417
  wp_enqueue_style( 'wcmp-style', plugin_dir_url(__FILE__).'css/style.css' );
418
  wp_enqueue_script('jquery');
419
  wp_enqueue_script('wp-mediaelement');
420
- wp_enqueue_script('wcmp-script', plugin_dir_url(__FILE__).'js/public.js', array('jquery', 'wp-mediaelement'), '1.0.126');
421
 
422
  $play_all = $GLOBALS[ 'WooCommerceMusicPlayer' ]->get_global_attr(
423
  '_wcmp_play_all',
@@ -495,7 +495,8 @@ if ( !class_exists( 'WooCommerceMusicPlayer' ) ) {
495
  'controls' => 'track',
496
  'layout' => 'new',
497
  'cover' => 0,
498
- 'volume' => 1
 
499
  ),
500
  $atts
501
  )
@@ -569,7 +570,7 @@ if ( !class_exists( 'WooCommerceMusicPlayer' ) ) {
569
  <a href="'.esc_url( get_permalink( $product->ID ) ).'">'.$product_obj->get_name().'</a>
570
  </div><!-- product title -->
571
  ';
572
- if(@floatval($price) != 0)
573
  {
574
  $output .= '<div class="wcmp-widget-product-purchase">
575
  '.wc_price($product_obj->get_price(), '').' <a href="?add-to-cart='.$product->ID.'"></a>
2
  /*
3
  Plugin Name: Music Player for WooCommerce
4
  Plugin URI: https://wcmp.dwbooster.com
5
+ Version: 1.0.127
6
  Text Domain: music-player-for-woocommerce
7
  Author: CodePeople
8
  Author URI: https://wcmp.dwbooster.com
417
  wp_enqueue_style( 'wcmp-style', plugin_dir_url(__FILE__).'css/style.css' );
418
  wp_enqueue_script('jquery');
419
  wp_enqueue_script('wp-mediaelement');
420
+ wp_enqueue_script('wcmp-script', plugin_dir_url(__FILE__).'js/public.js', array('jquery', 'wp-mediaelement'), '1.0.127');
421
 
422
  $play_all = $GLOBALS[ 'WooCommerceMusicPlayer' ]->get_global_attr(
423
  '_wcmp_play_all',
495
  'controls' => 'track',
496
  'layout' => 'new',
497
  'cover' => 0,
498
+ 'volume' => 1,
499
+ 'hide_purchase_buttons' => 0
500
  ),
501
  $atts
502
  )
570
  <a href="'.esc_url( get_permalink( $product->ID ) ).'">'.$product_obj->get_name().'</a>
571
  </div><!-- product title -->
572
  ';
573
+ if(@floatval($price) != 0 && @intval($hide_purchase_buttons) == 0)
574
  {
575
  $output .= '<div class="wcmp-widget-product-purchase">
576
  '.wc_price($product_obj->get_price(), '').' <a href="?add-to-cart='.$product->ID.'"></a>