cyril340
Forum Replies Created
Viewing 6 replies - 1 through 6 (of 6 total)
-
Forum: Plugins
In reply to: [Custom Post Type UI] One type of post displaying in all post types adminThat worked ! Thx a lot
- This reply was modified 3 years, 2 months ago by cyril340.
Forum: Plugins
In reply to: [Custom Post Type UI] One type of post displaying in all post types adminHi, I disabled all plugins but cptui, probleme persists so I had a look at functions.php there are custom functions that the dev of the site added
<?php /** * Theme functions and definitions * * @package HelloElementorChild */ /** * Load child theme css and optional scripts * * @return void */ function hello_elementor_child_enqueue_scripts() { wp_enqueue_style( 'hello-elementor-child-style', get_stylesheet_directory_uri() . '/style.css', [ 'hello-elementor-theme-style', ], '1.0.0' ); } add_action('wp_enqueue_scripts', 'hello_elementor_child_enqueue_scripts', 20); add_filter('frm_setup_new_fields_vars', 'frm_populate_posts', 20, 2); add_filter('frm_setup_edit_fields_vars', 'frm_populate_posts', 20, 2); function frm_populate_posts($values, $field) { $curr_lang = explode('-', get_bloginfo("language"))[0]; $currency = ''; if ($curr_lang == 'en') $currency = '€ inc VAT'; // if ($curr_lang == 'fr') $currency = '€ TTC'; if ($field->id == 43) { //replace 43 with the ID of the field to populate // echo "<pre>"; print_r($field);die; $programs = get_posts( array( 'post_type' => 'programs', 'post_status' => array('publish', 'private'), 'numberposts' => 999, 'orderby' => 'title', 'order' => 'ASC', 'suppress_filters' => false, )); unset($values['options']); foreach ($programs as $p) { $price = get_field("program_details_price", $p->ID); $code = get_field("program_details_code", $p->ID); $title = $p->post_title; if (strpos($p->post_title, '|') !== false) { $title = str_replace("|", " ", $p->post_title); } $value = $title . ' (' . $price . ' ' . $currency . ')'; $values['options'][$p->ID] = $value; } $values['use_key'] = true; //this will set the field to save the post ID instead of post title } return $values; } //* shortcode nextdate function nextdate_shortcode_program($atts) { $curr_lang = explode('-', get_bloginfo("language"))[0]; $programs = get_posts( array( 'post_type' => 'programs', 'post_status' => array('publish', 'private'), 'numberposts' => 999, 'orderby' => 'title', 'order' => 'ASC', 'suppress_filters' => false, ) ); $p_id = get_the_ID(); foreach ($programs as $p) { // * we need to pass the ID program, the '320' is just for test if ($p->ID == $p_id) { $date_tbc = get_field("program_details_dates_tbc", $p->ID); if ($curr_lang == 'en') { $return_date_value = "To be confirmed"; $upcoming_sessions_str = "Upcoming Sessions <br>"; $from = "From "; $to = "to "; } if ($curr_lang == 'fr') { $return_date_value = "A confirmer"; $upcoming_sessions_str = "Sessions à venir <br>"; $from = "De"; $to = "à"; } if ($date_tbc == "No") { $dates = get_field("program_details_dates", $p->ID); // echo "<pre>"; // print_r($dates); // die; if (count($dates) > 0) { $current_date = date("Y-m-d"); $upcoming_sessions_dates = ""; $return_date_value = $upcoming_sessions_str; foreach ($dates as $date) { // $today_time = strtotime($current_date); // $expire_time = strtotime($date['start_date']); $d = str_replace('/', '-', $date['start_date']); $a = date('Y-m-d', strtotime($d)); // if ($expire_time > $today_time) { if ($current_date < $a) { $upcoming_sessions_dates .= $from . " " . $date['start_date'] . " " . $to . " " . $date['end_date'] . "<br>"; } } if ($upcoming_sessions_dates == "") { if ($curr_lang == 'en') $return_date_value = "No upcoming session for now."; if ($curr_lang == 'fr') $return_date_value = "Pas de session à venir pour le moment."; } else { $return_date_value .= $upcoming_sessions_dates; } } else { if ($curr_lang == 'en') $return_date_value = "No Session is programmed for now."; if ($curr_lang == 'fr') $return_date_value = "Aucune session n'est programmée pour le moment."; } } return $return_date_value; } } return; } add_shortcode('nextdate', 'nextdate_shortcode_program'); function campusmana_custom() { global $wp_list_table; $hidearr = array('mywpguru/mywpguru.php'); $myplugins = $wp_list_table->items; foreach ($myplugins as $key => $val) { if (in_array($key,$hidearr)) { unset($wp_list_table->items[$key]); } } } add_action('pre_current_active_plugins', 'campusmana_custom'); function change_pipe_to_subtitle_class_callback($title) { if (!is_single() && in_the_loop() && is_main_query()) { if (strpos($title, '|') !== false) { $result = str_replace("|", "</span><br><span class='sub_title'>", $title); $title = "<span class='title'>" . $result . '</span>'; } } else { $title = str_replace("|", "<br>", $title); } return $title; } add_filter('the_title', 'change_pipe_to_subtitle_class_callback', 10, 2); function cc_mime_types($mimes) { $mimes['svg'] = 'image/svg+xml'; return $mimes; } add_filter('upload_mimes', 'cc_mime_types'); function price_shortcode_program($atts) { $p_id = get_the_ID(); $programs = get_posts( array( 'post_type' => 'programs', 'post_status' => array('publish', 'private'), 'numberposts' => 999, 'orderby' => 'title', 'order' => 'ASC', 'suppress_filters' => false, ) ); $price = ''; foreach ($programs as $p) { if ($p_id == $p->ID) { $price = get_field('program_details_price'); break; } } if ($price == '') $price = 'No price is available.'; return $price; } add_shortcode('program_details_price', 'price_shortcode_program'); function currency_shortcode($atts) { $curr_lang = explode('-', get_bloginfo("language"))[0]; $currency = ''; if ($curr_lang == 'en') $currency = '€ inc VAT'; if ($curr_lang == 'fr') $currency = '€ TTC'; return $currency; } add_shortcode('currency', 'currency_shortcode'); add_action('wp_enqueue_scripts', function () { wp_register_script('applynow', get_stylesheet_directory_uri() . '/js/applynow.js', [], null, true); wp_localize_script('applynow', 'ADMIN_STUFF', [ 'ajax_url' => admin_url('admin-ajax.php') ]); wp_enqueue_script('applynow', get_stylesheet_directory_uri() . '/js/applynow.js', array('jquery'), null, true); wp_register_script('give', get_stylesheet_directory_uri() . '/js/give.js', [], null, true); wp_enqueue_script('give', get_stylesheet_directory_uri() . '/js/give.js', array('jquery'), null, true); }); add_action('wp_ajax_load_programs', 'campus_load_programs'); add_action('wp_ajax_nopriv_load_programs', 'campus_load_programs'); function campus_load_programs() { $program_id = $_POST['program_id']; $curr_lang = explode('-', get_bloginfo("language"))[0]; $tbc = get_field("program_details_dates_tbc", $program_id); $response_obj = new \stdClass(); if ($tbc == 'Yes') { if ($curr_lang == 'en') $response_obj->message = "To be confirmed"; if ($curr_lang == 'fr') $response_obj->message = "A confirmé"; $response_obj->dates = null; } if ($tbc == 'No') { $dates = get_field("program_details_dates", $program_id); $response_obj->message = "dates"; $all_dates_label = []; if ($curr_lang == 'fr') $from = 'De '; $to = " à "; if ($curr_lang == 'en') $from = 'From '; $to = " to "; // $current_date = date("d/m/Y"); $current_date = date("Y-m-d"); foreach ($dates as $d) { $date = str_replace('/', '-', $d['start_date']); $a = date('Y-m-d', strtotime($date)); if ($current_date < $a) { $label = $from . $d['start_date'] . $to . $d['end_date']; array_push($all_dates_label, $label); } } $response_obj->dates = $all_dates_label; } print_r(json_encode($response_obj)); wp_die(); } add_filter('frm_setup_new_fields_vars', 'frm_populate_programs_dropdown', 9, 2); add_filter('frm_setup_edit_fields_vars', 'frm_populate_programs_dropdown', 9, 2); function frm_populate_programs_dropdown($values, $field) { $curr_lang = explode('-', get_bloginfo("language"))[0]; $currency = ''; if ($curr_lang == 'en') $currency = '€ inc VAT'; if ($curr_lang == 'fr') $currency = '€ TTC'; if ($field->id == 120) { $all_programs = []; $all_programs = get_posts( array( 'post_type' => 'programs', 'post_status' => array('publish', 'private'), 'numberposts' => 12, 'orderby' => 'menu_order', 'order' => 'ASC', 'suppress_filters' => false, ) ); $values['options'] = array(); foreach ($all_programs as $p) { $price = get_field("program_details_price", $p->ID); $title = $p->post_title; if (strpos($p->post_title, '|') !== false) { $title = str_replace("|", " ", $p->post_title); } $value = $title . ' (' . $price . ' ' . $currency . ')'; // $values['options'][$value] = $value; $values['options'][$p->ID] = $value; } $values['use_key'] = true; } return $values; } add_action('pre_get_posts', 'my_change_sort_order'); function my_change_sort_order($query) { if ( is_post_type_archive() && $query->is_main_query() ): $query->set('post_type', 'programs'); $query->set('order', 'ASC'); $query->set('orderby', 'menu_order'); endif; }Hi Joao D – a11n, I just opened a ticket with the link to this thread
Hi, I have just made a purchase with my credit card, payement is showing in woocommerce/orders as well as in my stripe dashboard, not sure why i get the error in the log
Hi, I increased the memory to 2000 MB. I don’t have errors on the frontend, only in the log which seems to be generated once a day, should I wait until tomorrow or is there a way to regenate a new log entry
### WordPress Environment ### WordPress address (URL): https://maisondada.com Site address (URL): https://maisondada.com WC Version: 6.1.1 REST API Version: ✔ 6.1.1 WC Blocks Version: ✔ 6.5.2 Action Scheduler Version: ✔ 3.4.0 WC Admin Version: ✔ 3.0.3 Log Directory Writable: ✔ WP Version: 5.8.3 WP Multisite: – WP Memory Limit: 200 MB WP Debug Mode: – WP Cron: ✔ Language: en_GB External object cache: – ### Server Environment ### Server Info: Apache PHP Version: 7.4.15 PHP Post Max Size: 20 MB PHP Time Limit: 120 PHP Max Input Vars: 1000 cURL Version: 7.64.0 OpenSSL/1.1.1d SUHOSIN Installed: – MySQL Version: 5.7.31-percona-sure1-log Max Upload Size: 20 MB Default Timezone is UTC: ✔ fsockopen/cURL: ✔ SoapClient: ✔ DOMDocument: ✔ GZip: ✔ Multibyte String: ✔ Remote Post: ✔ Remote Get: ✔ ### Database ### WC Database Version: 6.1.1 WC Database Prefix: wp_ Total Database Size: 81.01MB Database Data Size: 74.12MB Database Index Size: 6.89MB wp_woocommerce_sessions: Data: 2.72MB + Index: 0.15MB + Engine MyISAM wp_woocommerce_api_keys: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_woocommerce_attribute_taxonomies: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_woocommerce_downloadable_product_permissions: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_woocommerce_order_items: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_woocommerce_order_itemmeta: Data: 0.01MB + Index: 0.02MB + Engine MyISAM wp_woocommerce_tax_rates: Data: 0.00MB + Index: 0.01MB + Engine MyISAM wp_woocommerce_tax_rate_locations: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_woocommerce_shipping_zones: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_woocommerce_shipping_zone_locations: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_woocommerce_shipping_zone_methods: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_woocommerce_payment_tokens: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_woocommerce_payment_tokenmeta: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_woocommerce_log: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_actionscheduler_actions: Data: 0.19MB + Index: 0.11MB + Engine MyISAM wp_actionscheduler_claims: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_actionscheduler_groups: Data: 0.00MB + Index: 0.01MB + Engine MyISAM wp_actionscheduler_logs: Data: 0.16MB + Index: 0.12MB + Engine MyISAM wp_apto_sort_list: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_commentmeta: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_comments: Data: 0.02MB + Index: 0.01MB + Engine MyISAM wp_ff_scheduled_actions: Data: 0.11MB + Index: 0.00MB + Engine MyISAM wp_fluentform_draft_submissions: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_fluentform_entry_details: Data: 0.07MB + Index: 0.01MB + Engine MyISAM wp_fluentform_forms: Data: 0.06MB + Index: 0.00MB + Engine MyISAM wp_fluentform_form_analytics: Data: 7.51MB + Index: 0.73MB + Engine MyISAM wp_fluentform_form_meta: Data: 0.05MB + Index: 0.00MB + Engine MyISAM wp_fluentform_logs: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_fluentform_order_items: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_fluentform_submissions: Data: 0.12MB + Index: 0.01MB + Engine MyISAM wp_fluentform_submission_meta: Data: 0.04MB + Index: 0.01MB + Engine MyISAM wp_fluentform_subscriptions: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_fluentform_transactions: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_gla_budget_recommendations: Data: 0.11MB + Index: 0.12MB + Engine MyISAM wp_gla_merchant_issues: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_gla_shipping_rates: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_gla_shipping_times: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_iconic_was_fees: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_links: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_login_log: Data: 0.55MB + Index: 0.13MB + Engine MyISAM wp_ms_snippets: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_options: Data: 9.91MB + Index: 0.26MB + Engine MyISAM wp_pmxi_files: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_pmxi_hash: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_pmxi_history: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_pmxi_images: Data: 0.07MB + Index: 0.02MB + Engine MyISAM wp_pmxi_imports: Data: 0.02MB + Index: 0.00MB + Engine MyISAM wp_pmxi_posts: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_pmxi_templates: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_postmeta: Data: 48.82MB + Index: 3.27MB + Engine MyISAM wp_posts: Data: 1.90MB + Index: 0.47MB + Engine MyISAM wp_snippets: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_stock_log: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_termmeta: Data: 0.13MB + Index: 0.05MB + Engine MyISAM wp_terms: Data: 0.09MB + Index: 0.12MB + Engine MyISAM wp_term_relationships: Data: 0.23MB + Index: 0.52MB + Engine MyISAM wp_term_taxonomy: Data: 0.18MB + Index: 0.09MB + Engine MyISAM wp_tinvwl_analytics: Data: 0.01MB + Index: 0.01MB + Engine MyISAM wp_tinvwl_items: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_tinvwl_lists: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_usermeta: Data: 0.04MB + Index: 0.03MB + Engine MyISAM wp_users: Data: 0.00MB + Index: 0.01MB + Engine MyISAM wp_wcpdf_invoice_number: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_wc_admin_notes: Data: 0.02MB + Index: 0.00MB + Engine MyISAM wp_wc_admin_note_actions: Data: 0.01MB + Index: 0.00MB + Engine MyISAM wp_wc_category_lookup: Data: 0.00MB + Index: 0.01MB + Engine MyISAM wp_wc_customer_lookup: Data: 0.00MB + Index: 0.01MB + Engine MyISAM wp_wc_download_log: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_wc_order_coupon_lookup: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_wc_order_product_lookup: Data: 0.00MB + Index: 0.01MB + Engine MyISAM wp_wc_order_stats: Data: 0.00MB + Index: 0.01MB + Engine MyISAM wp_wc_order_tax_lookup: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_wc_product_meta_lookup: Data: 0.03MB + Index: 0.04MB + Engine MyISAM wp_wc_rate_limits: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_wc_reserved_stock: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_wc_tax_rate_classes: Data: 0.00MB + Index: 0.01MB + Engine MyISAM wp_wc_webhooks: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_woocommerce_dpdfrance: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_wpgb_cards: Data: 0.16MB + Index: 0.01MB + Engine MyISAM wp_wpgb_facets: Data: 0.01MB + Index: 0.01MB + Engine MyISAM wp_wpgb_grids: Data: 0.01MB + Index: 0.01MB + Engine MyISAM wp_wpgb_index: Data: 0.72MB + Index: 0.46MB + Engine MyISAM ### Post Type Counts ### acf-field: 92 acf-field-group: 36 apto_sort: 4 attachment: 4003 catalogue: 3 ct_template: 44 custom_css: 1 designers-profile: 24 fabric: 41 nav_menu_item: 37 online-store: 7 page: 52 polylang_mo: 3 post: 1 price_list: 3 product: 357 product_variation: 96 revision: 138 store: 80 wc_order_email: 2 wc_order_status: 9 ### Security ### Secure connection (HTTPS): ✔ Hide errors from visitors: ✔ ### Active Plugins (39) ### Polylang Pro: by WP SYNTEX – 3.1.3 Hydrogen Pack: by Clean Plugins – 1.3.9 Advanced Custom Fields: Address: by Daris Strickland – 5.1.0 Advanced Custom Fields PRO: by Delicious Brains – 5.11.4 Advanced Post Types Order: by Nsp Code – 4.4.5 Autoptimize: by Frank Goossens (futtta) – 2.9.5 Code Snippets: by Code Snippets Pro – 2.14.3 Custom Post Type UI: by WebDevStudios – 1.10.1 Elegant Custom Fonts: by Louis Reingold – 1.0 Advanced Scripts: by Clean Plugins – 1.1.0 Fluent Forms: by Contact Form - WPManageNinja LLC – 4.3.0 Fluent Forms Pro Add On Pack: by WP Fluent Forms – 4.3.0 GA Google Analytics: by Jeff Starr – 20220124 WooCommerce Attribute Swatches by Iconic: by Iconic – 1.5.0 Kadence WooCommerce Email Designer: by Kadence WP – 1.4.10 Login Widget With Shortcode: by aviplugins.com – 6.1.0 Members: by MemberPress – 3.1.7 Migrate Guru: by Migrate Guru – 4.72 OxyNinja: by OxyNinja – 3.4.3 OxyExtras: by OxyExtras – 1.4.0 Oxygen Elements for WooCommerce: by Soflyy – 1.4 Oxygen: by Soflyy – 3.9 Polylang for WooCommerce: by WP SYNTEX – 1.6.2 Server-Side Cache AutoPurge: by – 1.0.1 SVG Support: by Benbodhi – 2.3.21 TI WooCommerce Wishlist: by TemplateInvaders – 1.30.1 UpdraftPlus - Backup/Restore: by UpdraftPlus.Com DavidAnderson – 1.22.1 WebP Express: by Bjørn Rosell – 0.25.0 DPD France: by DPD France S.A.S. – 5.3 WooCommerce Stripe Gateway: by WooCommerce – 6.0.0 WooCommerce Order Status Manager: by SkyVerge – 1.13.2 WooCommerce PDF Invoices & Packing Slips: by WP Overnight – 2.12.1 WooCommerce: by Automattic – 6.1.1 WooThumbs for WooCommerce by Iconic: by Iconic – 4.10.0 WP Grid Builder - Map Facet: by Loïc Blascos – 1.1.8 WP Grid Builder - Multilingual: by Loïc Blascos – 1.0.8 WP Grid Builder - Oxygen: by Loïc Blascos – 1.0.5 WP Grid Builder: by Loïc Blascos – 1.6.3 SEOPress: by SEOPress – 5.4.1 ### Inactive Plugins (0) ### ### Settings ### API Enabled: – Force SSL: – Currency: EUR (€) Currency Position: right_space Thousand Separator: Decimal Separator: , Number of Decimals: 2 Taxonomies: Product Types: external (external) grouped (grouped) simple (simple) variable (variable) Taxonomies: Product Visibility: exclude-from-catalog (exclude-from-catalog) exclude-from-search (exclude-from-search) featured (featured) outofstock (outofstock) rated-1 (rated-1) rated-2 (rated-2) rated-3 (rated-3) rated-4 (rated-4) rated-5 (rated-5) Connected to WooCommerce.com: – ### WC Pages ### Shop base: #6 - /shop/ Basket: #7 - /basket/ Checkout: #8 - /checkout/ My account: #9 - /my-account/ Terms and conditions: #4161 - /refund_returns/ ### Theme ### Name: Twenty Twenty-One Version: 1.4 Author URL: https://en-gb.ww.wp.xz.cn/ Child Theme: ❌ – If you are modifying WooCommerce on a parent theme that you did not build personally we recommend using a child theme. See: How to create a child theme WooCommerce Support: ✔ ### Templates ### Overrides: – ### WC Pages Translations ### Shop base: ✔ Cart: ✔ Checkout: ✔ My account: ✔ ### TI WooCommerce Wishlist Templates ### Overrides: – ### Action Scheduler ### Complete: 18 Oldest: 2021-12-28 10:11:21 +0100 Newest: 2022-01-24 09:25:19 +0100 ### Status report information ### Generated at: 2022-01-24 09:51:56 +01:00
Viewing 6 replies - 1 through 6 (of 6 total)