Plugin Directory

Changeset 2298276

Timestamp:
05/05/2020 08:01:12 AM (4 years ago)
Author:
mehedi_csit
Message:

I have fixed coding standards and updated author details

Location:
woo-stock-count-progress-bar/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • woo-stock-count-progress-bar/trunk/readme.txt

    r2190286 r2298276  
    11=== Stock Status Bar for Woocommerce ===
    2 Contributors: mehedi_csit, raihan143
    3 Tags: woocommerce-progress-bar, stock,woocommerce,woocommerce-stock,stock-status,stock-status-in-prorgess-bar
     2Contributors: mehedi_csit
     3Tags:woocommerce-progress-bar,woocommerce,woocommerce-stock,stock-status,stock-status-in-prorgess-bar
     4Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=ANJRBFTXBUE8Q&source=url
    45Requires at least: 4.2
    5 Tested up to: 5.2.4
    6 Requires PHP: 5.4
     6Tested up to: 5.
     7Requires PHP: 5.
    78Stable tag: 1.0.0
    89License: GPL-2.0+
  • woo-stock-count-progress-bar/trunk/wpbs-stock-status-bar.php

    r2190277 r2298276  
    33Plugin Name: Stock Status Bar for Woocommerce
    44Description: This plugin will help you to display the woocommerce product stock quantity in a horizontal progress bar.
    5 Plugin URI: https://www.code4webs.com
    6 Version: 1.0.0
    7 Author: code4webs
    8 Author URI: https://www.facebook.com/mehedicsit
     5Plugin URI: https://
     6Version: 1..0
     7Author:
     8Author URI: https://
    99License: GPL-2.0+
    1010License URI: http://www.gnu.org/licenses/gpl-2.0.txt
     
    1818
    1919// enqueue scripts
    20 function wpbsc_scripts_register(){
     20function wpbsc_scripts_register(){
    2121
    2222  wp_enqueue_style( 'wpbsc_custom_css', plugins_url('scripts/wpbs-style.css', __FILE__) );
    23   wp_enqueue_script( 'wpbsc_jqmeter', plugins_url('scripts/jqmeter.min.js', __FILE__), array('jquery'),null,true);
    24   wp_enqueue_script( 'wpbsc_custom_script', plugins_url('scripts/custom.js', __FILE__), array('jquery'),null,true);
     23  wp_enqueue_script( 'wpbsc_jqmeter', plugins_url('scripts/jqmeter.min.js', __FILE__), array('jquery'),);
     24  wp_enqueue_script( 'wpbsc_custom_script', plugins_url('scripts/custom.js', __FILE__), array('jquery'),);
    2525
    2626}
     
    3030 * Check if WooCommerce is active
    3131 **/
    32 if ( in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ) {
     32if ( in_array('active_plugins', get_option( 'active_plugins' ) ) ) ) {
    3333    // Put your plugin code here
    34     add_action( 'woocommerce_before_add_to_cart_form', 'wpbsc_show_stock_shop', 10 );
     34    add_action('woocommerce_before_add_to_cart_form', 'wpbsc_show_stock_shop', 10 );
    3535
    3636    function wpbsc_show_stock_shop() {
     
    3838        global $post;
    3939        $manage_stock = get_post_meta( $post->ID, '_manage_stock', true );
    40         if(is_product() && $product->is_type( 'simple' ) && $manage_stock == 'yes'){
     40        if({
    4141       
    4242        $stock = get_post_meta( $post->ID, '_stock', true );
     
    5656    }
    5757}else{
    58     add_action('admin_notices', function(){
     58    add_action('admin_notices', function(){
    5959        echo '<div class="notice notice-error"><p>'.esc_html__('Stock Status Bar For Woocommerce requires WooCommerce to be installed and active. You can download', 'wpbsc').' <a href="https://woocommerce.com/" target="_blank">WooCommerce</a> '.esc_html__('here.','wpbsc').'</p></div>';   
    6060    });
Note: See TracChangeset for help on using the changeset viewer.