Forum Replies Created

Viewing 12 replies - 1 through 12 (of 12 total)
  • Forum: Plugins
    In reply to: [Yoast SEO] %%ct_pa_%%
    Thread Starter gerardval

    (@gerardval)

    Nom Identifiant
    Auteur auteur

    <title>Voyage excentrique et ferroviaire autour du Royaume-Uni - Paul Theroux</title>

    page source (ctrl+u) ok

    Thread Starter gerardval

    (@gerardval)

    Perfect, thank you !

    • This reply was modified 1 year, 12 months ago by gerardval.
    Thread Starter gerardval

    (@gerardval)

    Is it a way to get around this problem ? Another method ?

    Thread Starter gerardval

    (@gerardval)

    Hi,

    some news ?

    Thread Starter gerardval

    (@gerardval)

    I tried also this way, working everywhere except on archive, search and category page :

    function remove_addcart() {
       global $post;
    	if (is_product()) {
    	$product = wc_get_product($post->ID);
    	$dispo = $product->get_attribute( 'pa_disponibilite' );
    	if (($dispo != 1) && (($product->stock) == 0)) {
    	add_filter( 'woocommerce_is_purchasable', '__return_false');
    		}
    	}
    }
    add_action( 'wp', 'remove_addcart' );
    • This reply was modified 2 years, 8 months ago by gerardval.
    Thread Starter gerardval

    (@gerardval)

    I put the WP_debug to true and this is the error :

    Uncaught Error: Call to a member function get_attribute() on bool in /home/leslibw/www/sitetest/wp-content/themes/oceanwp-child-theme-master/functions.php:166 Stack trace: 
    #0 /home/leslibw/www/sitetest/wp-includes/class-wp-hook.php(307): remove_addcart(Object(WP)) 
    #1 /home/leslibw/www/sitetest/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters(false, Array) 
    #2 /home/leslibw/www/sitetest/wp-includes/plugin.php(524): WP_Hook->do_action(Array) 
    #3 /home/leslibw/www/sitetest/wp-includes/class-wp.php(787): do_action_ref_array('wp', Array) 
    #4 /home/leslibw/www/sitetest/wp-includes/functions.php(1330): WP->main(Array) 
    #5 /home/leslibw/www/sitetest/wp-admin/includes/post.php(1239): wp(Array) 
    #6 /home/leslibw/www/sitetest/wp-admin/includes/class-wp-posts-list-table.php(166): wp_edit_posts_query() 
    #7 /home/leslibw/www/sitetest/wp-admin/edit.php(225): WP_Posts_List_Table->prepare_items() 
    #8 {main} thrown in /home/leslibw/www/sitetest/wp-content/themes/oceanwp-child-theme-master/functions.php on line 166

    The line 166 is :
    $dispo = $product->get_attribute( 'pa_disponibilite' );

    I removed the entire function (which is working fine except on archive page):

    function remove_addcart() {
       $product = get_product();
    	$dispo = $product->get_attribute( 'pa_disponibilite' );
       if (($dispo > 1) && (($product->stock) == 0)) {
           remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 10 );
           remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_add_to_cart', 30 );
           remove_action( 'woocommerce_simple_add_to_cart', 'woocommerce_simple_add_to_cart', 30 );
           remove_action( 'woocommerce_grouped_add_to_cart', 'woocommerce_grouped_add_to_cart', 30 );
           remove_action( 'woocommerce_variable_add_to_cart', 'woocommerce_variable_add_to_cart', 30 );
           remove_action( 'woocommerce_external_add_to_cart', 'woocommerce_external_add_to_cart', 30 );
       }
    }
    add_action( 'wp', 'remove_addcart' );

    and the “panel library” is ok.

    Where was my error ? Why this ~#[|`[{ line 166 damaged the library ?

    Thanks for helping

    Thread Starter gerardval

    (@gerardval)

    No, I just need to know how to remove the “add to cart” button on archive pages.
    I already use a child theme.
    In functions.php, this snippet doesn’t work :
    remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 10 );

    I think I have to use another “taxonomy” than “woocommerce_after_shop_loop_item”, but I can’t find it.

    Thanks for helping.

    Gérard

    Thread Starter gerardval

    (@gerardval)

    Sorry, it was a WPRocket/CSS conflict with Chrome.
    I repaired it, so can you help me now ?

    Thread Starter gerardval

    (@gerardval)

    Ok.
    So, is it a compatibility problem ?

    Thread Starter gerardval

    (@gerardval)

    
    ### wp-core ###
    
    version: 5.9.3
    site_language: fr_FR
    user_language: fr_FR
    timezone: Europe/Paris
    permalink: /%year%/%monthnum%/%day%/%postname%/
    https_status: true
    multisite: false
    user_registration: 0
    blog_public: 0
    default_comment_status: open
    environment_type: production
    user_count: 3
    dotorg_communication: true
    
    ### wp-paths-sizes ###
    
    wordpress_path: /home/leslibw/www/sitetest
    wordpress_size: 1,18 Go (1265778151 bytes)
    uploads_path: /home/leslibw/www/sitetest/wp-content/uploads
    uploads_size: 3,45 Go (3700682795 bytes)
    themes_path: /home/leslibw/www/sitetest/wp-content/themes
    themes_size: 25,45 Mo (26691450 bytes)
    plugins_path: /home/leslibw/www/sitetest/wp-content/plugins
    plugins_size: 180,77 Mo (189546404 bytes)
    database_size: 326,71 Mo (342582399 bytes)
    total_size: 5,15 Go (5525281199 bytes)
    
    ### wp-active-theme ###
    
    name: OceanWP Child Theme (oceanwp-child-theme-master)
    version: 1.0
    author: OceanWP
    author_website: https://oceanwp.org/
    parent_theme: OceanWP (oceanwp)
    theme_features: core-block-patterns, widgets-block-editor, post-thumbnails, align-wide, wp-block-styles, responsive-embeds, editor-styles, editor-style, menus, post-formats, title-tag, automatic-feed-links, custom-header, custom-logo, html5, woocommerce, customize-selective-refresh-widgets, widgets
    theme_path: /home/leslibw/www/sitetest/wp-content/themes/oceanwp-child-theme-master
    auto_update: Désactivé
    
    ### wp-parent-theme ###
    
    name: OceanWP (oceanwp)
    version: 3.2.2
    author: OceanWP
    author_website: https://oceanwp.org/about-me/
    theme_path: /home/leslibw/www/sitetest/wp-content/themes/oceanwp
    auto_update: Désactivé
    
    ### wp-plugins-active (25) ###
    
    All-in-One WP Migration: version: 7.58, author: ServMask (latest version: 7.59), Mises à jour auto désactivées
    Colissimo shipping methods for WooCommerce: version: 1.6.8, author: Colissimo, Mises à jour auto désactivées
    Customer Reviews for WooCommerce: version: 4.38, author: CusRev, Mises à jour auto désactivées
    Elementor: version: 3.6.5, author: Elementor.com, Mises à jour auto désactivées
    Elementor Pro: version: 3.7.0, author: Elementor.com (latest version: 3.7.1), Mises à jour auto désactivées
    FiboSearch - AJAX Search for WooCommerce: version: 1.18.0, author: FiboSearch Team, Mises à jour auto désactivées
    Flexible Shipping: version: 4.11.7, author: WP Desk, Mises à jour auto désactivées
    Media Cleaner: version: 6.3.5, author: Jordy Meow, Mises à jour auto désactivées
    Newsletter, SMTP, Email marketing and Subscribe forms by Sendinblue: version: 3.1.41, author: Sendinblue, Mises à jour auto désactivées
    Ocean Custom Sidebar: version: 1.0.8, author: OceanWP, Mises à jour auto désactivées
    Ocean Extra: version: 1.9.4, author: OceanWP, Mises à jour auto désactivées
    Ocean Stick Anything: version: 2.0.3, author: OceanWP, Mises à jour auto désactivées
    Perform - Optimize Performance: version: 1.3.0, author: Mehul Gohil, Mises à jour auto désactivées
    Product Filter by WooBeWoo: version: 2.1.3, author: WooBeWoo, Mises à jour auto désactivées
    Product Import Export for WooCommerce: version: 2.2.0, author: WebToffee, Mises à jour auto désactivées
    Product Reviews Import Export for WooCommerce: version: 1.4.5, author: WebToffee, Mises à jour auto désactivées
    Product Video Gallery for Woocommerce: version: 1.3.3, author: NikHiL Gadhiya (latest version: 1.3.4), Mises à jour auto désactivées
    Sassy Social Share: version: 3.3.41, author: Team Heateor, Mises à jour auto désactivées
    Theme Customisations: version: 1.0.0, author: WooThemes, Mises à jour auto désactivées
    TI WooCommerce Wishlist: version: 1.44.1, author: TemplateInvaders, Mises à jour auto désactivées
    WooCommerce: version: 6.5.1, author: Automattic, Mises à jour auto désactivées
    WooCommerce Payments: version: 4.1.0, author: Automattic, Mises à jour auto désactivées
    WooCommerce Remove All Products: version: 6.4, author: Gabriel Reguly, Erik Golinelli, Mises à jour auto désactivées
    WooCommerce Shipping & Tax: version: 1.25.28, author: WooCommerce, Mises à jour auto désactivées
    Woo Product Remover: version: 1.1.0, author: Mohammad Farhat, Mises à jour auto désactivées
    
    ### wp-media ###
    
    image_editor: WP_Image_Editor_Imagick
    imagick_module_version: 1690
    imagemagick_version: ImageMagick 6.9.10-23 Q16 x86_64 20190101 https://imagemagick.org
    imagick_version: 3.5.1
    file_uploads: File uploads is turned off
    post_max_size: 130M
    upload_max_filesize: 128M
    max_effective_size: 128 Mo
    max_file_uploads: 20
    imagick_limits: 
    	imagick::RESOURCETYPE_AREA: 63 Go
    	imagick::RESOURCETYPE_DISK: 1.844674407371E+19
    	imagick::RESOURCETYPE_FILE: 768
    	imagick::RESOURCETYPE_MAP: 63 Go
    	imagick::RESOURCETYPE_MEMORY: 31 Go
    	imagick::RESOURCETYPE_THREAD: 1
    imagemagick_file_formats: 3FR, 3G2, 3GP, AAI, AI, ART, ARW, AVI, AVS, BGR, BGRA, BGRO, BIE, BMP, BMP2, BMP3, BRF, CAL, CALS, CANVAS, CAPTION, CIN, CIP, CLIP, CMYK, CMYKA, CR2, CRW, CUR, CUT, DATA, DCM, DCR, DCX, DDS, DFONT, DJVU, DNG, DOT, DPX, DXT1, DXT5, EPDF, EPI, EPS, EPS2, EPS3, EPSF, EPSI, EPT, EPT2, EPT3, ERF, EXR, FAX, FILE, FITS, FRACTAL, FTP, FTS, G3, G4, GIF, GIF87, GRADIENT, GRAY, GRAYA, GROUP4, GV, H, HALD, HDR, HEIC, HISTOGRAM, HRZ, HTM, HTML, HTTP, HTTPS, ICB, ICO, ICON, IIQ, INFO, INLINE, IPL, ISOBRL, ISOBRL6, J2C, J2K, JBG, JBIG, JNG, JNX, JP2, JPC, JPE, JPEG, JPG, JPM, JPS, JPT, JSON, K25, KDC, LABEL, M2V, M4V, MAC, MAGICK, MAP, MASK, MAT, MATTE, MEF, MIFF, MKV, MNG, MONO, MOV, MP4, MPC, MPEG, MPG, MRW, MSL, MSVG, MTV, MVG, NEF, NRW, NULL, ORF, OTB, OTF, PAL, PALM, PAM, PANGO, PATTERN, PBM, PCD, PCDS, PCL, PCT, PCX, PDB, PDF, PDFA, PEF, PES, PFA, PFB, PFM, PGM, PGX, PICON, PICT, PIX, PJPEG, PLASMA, PNG, PNG00, PNG24, PNG32, PNG48, PNG64, PNG8, PNM, PPM, PREVIEW, PS, PS2, PS3, PSB, PSD, PTIF, PWP, RADIAL-GRADIENT, RAF, RAS, RAW, RGB, RGBA, RGBO, RGF, RLA, RLE, RMF, RW2, SCR, SCT, SFW, SGI, SHTML, SIX, SIXEL, SPARSE-COLOR, SR2, SRF, STEGANO, SUN, SVG, SVGZ, TEXT, TGA, THUMBNAIL, TIFF, TIFF64, TILE, TIM, TTC, TTF, TXT, UBRL, UBRL6, UIL, UYVY, VDA, VICAR, VID, VIFF, VIPS, VST, WBMP, WEBP, WMF, WMV, WMZ, WPG, X, X3F, XBM, XC, XCF, XPM, XPS, XV, XWD, YCbCr, YCbCrA, YUV
    gd_version: bundled (2.1.0 compatible)
    gd_formats: GIF, JPEG, PNG, WebP, BMP, XPM
    ghostscript_version: 9.27
    
    ### wp-server ###
    
    server_architecture: Linux 4.14.253-ovh-vps-grsec-zfs-classid x86_64
    httpd_software: Apache
    php_version: 7.4.25 64bit
    php_sapi: fpm-fcgi
    max_input_variables: 16000
    time_limit: 165
    memory_limit: 512M
    max_input_time: -1
    upload_max_filesize: 128M
    php_post_max_size: 130M
    curl_version: 7.64.0 OpenSSL/1.1.1d
    suhosin: false
    imagick_availability: true
    pretty_permalinks: true
    htaccess_extra_rules: false
    
    ### wp-database ###
    
    extension: mysqli
    server_version: 5.6.50-log
    client_version: mysqlnd 7.4.25
    max_allowed_packet: 33554432
    max_connections: 151
    
    ### wp-constants ###
    
    WP_HOME: undefined
    WP_SITEURL: undefined
    WP_CONTENT_DIR: /home/leslibw/www/sitetest/wp-content
    WP_PLUGIN_DIR: /home/leslibw/www/sitetest/wp-content/plugins
    WP_MEMORY_LIMIT: 40M
    WP_MAX_MEMORY_LIMIT: 512M
    WP_DEBUG: false
    WP_DEBUG_DISPLAY: true
    WP_DEBUG_LOG: false
    SCRIPT_DEBUG: false
    WP_CACHE: false
    CONCATENATE_SCRIPTS: undefined
    COMPRESS_SCRIPTS: undefined
    COMPRESS_CSS: undefined
    WP_ENVIRONMENT_TYPE: Indéfini
    DB_CHARSET: utf8mb4
    DB_COLLATE: undefined
    
    ### wp-filesystem ###
    
    wordpress: writable
    wp-content: writable
    uploads: writable
    plugins: writable
    themes: writable
    
    
    Thread Starter gerardval

    (@gerardval)

    Thank you for replying.
    The problem with Hide Thumbnails option is than the video thumbnail is hidden too.
    The way I would is to see video thumbnail IF exists, but not the image thumbnail (same as cover in fact)

    Forum: Plugins
    In reply to: [Travelers' Map] Import csv
    Thread Starter gerardval

    (@gerardval)

    Merci !
    Peut-être puis-je “alimenter” la table wp_postmeta directement avec une requête SQL ?

Viewing 12 replies - 1 through 12 (of 12 total)