Well, I need this feature for photography print orders (only), instead of download or virtual sell, like a ordinary physic product.
All I’ve donne was edit the plugin file “\grfx\includes\woocommerce\product-types\class-wc-product-stock-image.php” and turn off (by comment) some code:
1. To add one or more prints of one photo (previously limited to one, making subtotal difer from total)
function grfx_minicart_total($cart_subtotal, $compound, $cart){
return $cart_subtotal;
}
2. Prevent default virtual items construction
public function __construct( $product ) {
//$this->virtual = 'yes';
//...
}
At public function create_initial_product() class at “\grfx\includes\woocommerce\class-product-creator.php”:
1. To activate AJAX button ad to cart in product listing/grid, for faster image selection:
//update_post_meta($post_id, 'grfx_finish_product_type', 'stock_image');
update_post_meta($post_id, 'grfx_finish_product_type', 'simple');
2. To name an product with the filename, when no metadata available, instead of “-” caracter
//!empty( $metadata->Title ) ? $this->product_title = $metadata->Title : $this->product_title = '-';
!empty( $metadata->Title ) ? $this->product_title = $metadata->Title : $this->product_title = $this->file_name;
At public function set_stock_image_data() class:
// $this->set_to_meta( '_downloadable', 'yes' );
$this->set_to_meta( '_downloadable', 'no' );
//is virtual product
// $this->set_to_meta( '_virtual', 'yes' );
$this->set_to_meta( '_virtual', 'no' );
// $this->set_to_meta( '_download_limit', get_option( 'grfx_download_limit', '3' ) );
$this->set_to_meta( '_download_limit', '' );
// $this->set_to_meta( '_download_expiry', get_option( 'grfx_download_expiry', '7' ) );
Nothing more, I think… I recognise the unorthodox solutions, but, in such short window of time, works. :/
Maybe could some buttons on plugin configuration section activate/deactivate these functionalities.
Anyway, now, my website works well for my needs.
Thank You! ??