I’ve had reports the store is broken, I’ve investigated and found that the woocommerce.php file inside the plugin folder is missing.
I’m totally at a loss to know how this has happened, but it has happened on 3 websites within a 48h period.
It’s an easy fix to re-install WooCommerce but I want to know if anyone has come across this and possible causes?
SFTP and even WordPress Admin access is very limited to a small number of trusted people, who haven’t made any significant updates or changes that could have caused the issue.
]]>> [24-Aug-2020 23:53:14 UTC] PHP Parse error: syntax error, unexpected ‘:’, expecting ‘{‘ in /home/domainname/public_html/wp-content/plugins/woocommerce/woocommerce.php on line 56
What does this mean?
]]>Installation failed: Could not copy file. woocommerce/woocommerce.php
Could you tell me how to fix it? Thanks a lot. Have a nice day!
]]>function travelafrique_woocommerce_support(){
add_theme_support('woocommerce');
}
add_action('after_setup_theme', 'travelafrique_woocommerce_support');
I also can’t override template files by copying WooCommerce Template files into my Themes folder. I also know that the correct way to that would be by copying the necessary files into the following folder wp-content/themes/MYTHEME/woocommerce/templates
I’ve spent already two days trying to fix, this but I can’t see, what has gone wrong. Any help would be appreciated.
]]>I am using Woocommerce Offcial php rest Api library in my local Crm application. And calling Sales report data.
$query = [ ‘context’ => ‘view’, ‘date_min’ => ‘2019-01-01’, ‘date_max’ => ‘2019-01-22’ ];
$sales_report = $woocommerce->get(‘reports/sales’, $query);
But when I get $sales_report object, I came to know that customer count from last date (in this case [2019-01-22] object ) from [totals] object is always zero. If I alter date_max to ‘2019-01-10’ than Customer count Of 10th of jan will show as Zero. Full Code pasted On pastebin >> https://pastebin.com/UdTSfSnq Full Output Is as follow >> https://pastebin.com/nbecistE If I change ‘date_max’ from 22nd to 23rd than Customer Count Of 22 would be 8 But 22nd’s will be 0 Image link as 23 as date_max Image Link as 22 as date_max How can I solve this issue ? If I am using postman To see customer count. It also showing 0 for last date of Totals object.I know I have missing something silly Or maybe this could be bug in woo api. can anyone help me through this or lead me towards any resource.
My products results page is giving me a 500 internal server error. Can anyone give me any advice as to why?
Link: https://bit.ly/2ae8gFV2
This is from the page throwing the error:
<?php
/**
* The Template for displaying product archives, including the main shop page which is a post type archive
*
* This template can be overridden by copying it to yourtheme/woocommerce/archive-product.php.
*
* HOWEVER, on occasion WooCommerce will need to update template files and you (the theme developer).
* will need to copy the new files to your theme to maintain compatibility. We try to do this.
* as little as possible, but it does happen. When this occurs the version of the template file will.
* be bumped and the readme will list any important changes.
*
* @see https://docs.woothemes.com/document/template-structure/
* @author WooThemes
* @package WooCommerce/Templates
* @version 2.0.0
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
}
$page_id = wc_get_page_id( 'shop' );
$style = (comet_meta($page_id, 'page_title_style') != '') ? comet_meta($page_id, 'page_title_style') : 'grey' ;
$text_align = (comet_meta($page_id, 'title_text_align') != '') ? comet_meta($page_id, 'title_text_align') : '';
$text_transform = (comet_meta($page_id, 'title_text_transform') != '') ? comet_meta($page_id, 'title_text_transform') : '';
$page_title = (comet_meta($page_id, 'page_title') != '') ? comet_meta($page_id, 'page_title') : get_the_title($page_id);
$page_subtitle = (comet_meta($page_id, 'page_subtitle') != '') ? comet_meta($page_id, 'page_subtitle') : '';
$columns_layout = ( isset( $_GET['col'] ) && in_array( $_GET['col'], array( '2', '3', '4' ) ) ) ? $_GET['col'] : '';
$get_sidebar_var = ( isset($_GET['sidebar']) && $_GET['sidebar'] == 'off' ) ? false : true;
get_header( 'shop' ); ?>
<article id="<?php echo esc_html($post->post_name); ?>" class="page-single">
<?php if (comet_meta($page_id, 'show_page_title') != '' && comet_meta($page_id, 'show_page_title') != 'no'): ?>
<section class="page-title <?php echo esc_attr($style); ?>">
<?php if (comet_meta($page_id, 'page_title_style') != '' && comet_meta($page_id, 'page_title_style') == 'parallax'): ?>
<div class="parallax-bg" data-parallax="scroll" data-image-src="<?php echo esc_url(comet_meta($page_id, 'title_bg')); ?>"></div>
<div class="parallax-overlay">
<?php endif ?>
<div class="centrize">
<div class="v-center">
<div class="container">
<div class="title <?php echo esc_attr($text_align); ?>">
<h1 class="<?php echo esc_attr($text_transform); ?>"><?php echo esc_attr($page_title); ?><span class="red-dot"></span></h1>
<h4><?php echo esc_attr($page_subtitle); ?></h4>
<hr>
</div>
</div>
</div>
</div>
<?php if (comet_meta($page_id, 'page_title_style') != '' && comet_meta($page_id, 'page_title_style') == 'parallax'): ?>
</div>
<?php endif ?>
</section>
<?php endif ?>
<?php
/**
* woocommerce_before_main_content hook.
*
* @hooked woocommerce_output_content_wrapper - 10 (outputs opening divs for the content)
* @hooked woocommerce_breadcrumb - 20
*/
do_action( 'woocommerce_before_main_content' );
?>
<?php if (comet_options('shop_sidebar') && $get_sidebar_var): ?>
<div class="row">
<?php /*?><div class="col-md-3 hidden-sm hidden-xs">
<div id="sidebar">
<?php dynamic_sidebar('shop_sidebar'); ?>
</div>
</div><?php */?>
<div class="col-md-12">
<?php endif ?>
<?php
/**
* woocommerce_archive_description hook.
*
* @hooked woocommerce_taxonomy_archive_description - 10
* @hooked woocommerce_product_archive_description - 10
*/
do_action( 'woocommerce_archive_description' );
?>
<!--<h1 class="hydrochloride">Product search results for 'hydrochloride'</h1>-->
<?php if ( have_posts() ) : ?>
<div class="shop-menu">
<?php
/**
* woocommerce_before_shop_loop hook.
*
* @hooked woocommerce_result_count - 20
* @hooked woocommerce_catalog_ordering - 30
*/
do_action( 'woocommerce_before_shop_loop' );
?>
</div>
<div class="cas-row">
<div class="pro-name">Product Name</div>
<div class="cas-mane">CAS#</div></div>
<?php if ($columns_layout || comet_options('shop_columns')): ?>
<?php $col_width = ($columns_layout) ? $columns_layout : comet_options('shop_columns') ; ?>
<div class="columns-<?php echo esc_attr( $col_width ); ?>">
<?php endif ?>
<?php woocommerce_product_loop_start(); ?>
<?php woocommerce_product_subcategories(); ?>
<?php while ( have_posts() ) : the_post(); ?>
<?php //wc_get_template_part( 'content', 'product' ); ?>
<div class="enqaer">
<ul ><li class="them-mail"><a href="<?php echo get_permalink(); ?>"><?php echo get_the_post_thumbnail(); ?></a></li>
<div class="show">
<li class="prod-title"><a href="<?php echo get_permalink(); ?>"><?php the_title();?></a> </li>
<li class="product-name"><?php the_field ('product_name_'); ?> </li>
<?php /*?> <li class="cas"><?php the_field ('sq'); ?> </li> <?php */?>
<li class="cas hidden_cas"> <?php
/**
* woocommerce_single_product_summary hook.
*
* @hooked woocommerce_template_single_meta - 40
*/
do_action( 'woocommerce_single_product_summary' );
?></li>
<li class="product-info"><a href="<?php the_permalink();?>"> Product info</a> </li>
<li class="product-about"><a href="<?php echo get_site_url()?>/inquire/<?php echo '?proid='.get_the_id(); ?>"> Inquire about this product >></a></li>
</div></ul>
</div>
<?php endwhile; // end of the loop. ?>
<div class="container">
<div class="green-serch">
<div class="colam-serch">
<h4>Search products by name or CAS#:</h4>
<form role="search" method="get" class="woocommerce-product-search" action="<?php echo esc_url( home_url( '/' ) ); ?>">
<label class="screen-reader-text" for="s"><?php _e( 'Search for:', 'woocommerce' ); ?></label>
<input type="search" class="search-field" placeholder="<?php echo esc_attr_x( 'Search Products…', 'placeholder', 'woocommerce' ); ?>" value="<?php echo get_search_query(); ?>" name="s" title="<?php echo esc_attr_x( 'Search for:', 'label', 'woocommerce' ); ?>" />
<div class="green-btn">
<input type="submit" value="<?php echo esc_attr_x( 'Search', 'submit button', 'woocommerce' ); ?>" />
<input type="hidden" name="post_type" value="product" />
</div>
</form>
</div>
</div>
</div>
<?php woocommerce_product_loop_end(); ?>
<?php if ($columns_layout || comet_options('shop_columns')): ?>
</div>
<?php endif ?>
<?php
/**
* woocommerce_after_shop_loop hook.
*
* @hooked woocommerce_pagination - 10
*/
do_action( 'woocommerce_after_shop_loop' );
?>
<?php elseif ( ! woocommerce_product_subcategories( array( 'before' => woocommerce_product_loop_start( false ), 'after' => woocommerce_product_loop_end( false ) ) ) ) : ?>
<?php wc_get_template( 'loop/no-products-found.php' ); ?>
<?php endif; ?>
<?php if (comet_options('shop_sidebar') && $get_sidebar_var): ?>
</div>
</div>
<?php endif ?>
<?php
/**
* woocommerce_after_main_content hook.
*
* @hooked woocommerce_output_content_wrapper_end - 10 (outputs closing divs for the content)
*/
do_action( 'woocommerce_after_main_content' );
?>
</article>
<?php get_footer( 'shop' ); ?>
a
]]>I’ve added Woocommerce to my site and following the instructions I am trying to add the Woocommerce Loop to the page.php of my template.
I am having trouble identifying what exactly I need to replace – this is the code from my page.php
<?php
get_template_part('single', 'config');
get_header();
global $blogConf, $show, $single_content_type, $data, $isFrontendEditorPage, $isProfileOptionsPage, $isFavoritePage, $isDraftPage;
if (have_posts ()) { the_post();
$isFrontendEditorPage=isset($data['frontend_editor_page'])&&$data['frontend_editor_page']==$post->ID ? true:false;
$isProfileOptionsPage=isset($data['profile_options_page'])&&$data['profile_options_page']==$post->ID ? true:false;
$isFavoritePage =isset($data['favorite_page']) &&$data['favorite_page'] ==$post->ID ? true:false;
$isDraftPage =isset($data['draft_page']) &&$data['draft_page'] ==$post->ID ? true:false;
$single_content_type=array('item','teaser');
if($isFavoritePage || $isDraftPage){get_template_part('frontend','favorite');}
else{get_template_part('content', 'single');}
}
get_footer();
Any help or suggestions gratefully received!
Thanks
]]><?php get_header(); ?>
<section id="main-wrapper">
<?php woocommerce_content(); ?>
</section>
<?php get_footer(); ?>
How can I ater this behavior?
]]>The plugin is woocommerce what is the shortcode for woocommerce buttons or is there a reason why my site wont display these buttons?
Check it out here https://mobilereactor.co.uk/shop/ – i need to fix the shortcode error so that actual buttons are displayed.
I made these modifications to my functions.php file on this page to get to where I am.
Please help thank you…
Theme is XING
]]>