Forum Replies Created

Viewing 15 replies - 1 through 15 (of 20 total)
  • Thread Starter aaronnb87

    (@aaronnb87)

    Incase anyone else has this issue, I was able to resolve it using a solution shared for a different issue in another thread https://ww.wp.xz.cn/support/topic/breadcrumbs-not-displaying-full-path/#new-topic-0

    Thread Starter aaronnb87

    (@aaronnb87)

    Hi @611shabnam and @maybellyne , just wanted to see if you had any other ideas based on my last response.

    Thread Starter aaronnb87

    (@aaronnb87)

    hi @611shabnam

    ‘resources’ = custom post type
    ‘resource-type’ = custom taxonomy

    We implemented via custom code.

    <?php
    /*
    Plugin Name: CFGI Resource
    Description: A plugin to create a custom post type called Resources with custom taxonomies.
    Author: Brafton
    Version: 1.5
    */

    if ( ! defined( 'ABSPATH' ) ) {
    exit; // Exit if accessed directly.
    }

    function cfgi_resources_init() {
    // Register Custom Post Type
    $labels = array(
    'name' => _x( 'Resources', 'Post Type General Name', 'text_domain' ),
    'singular_name' => _x( 'Resource', 'Post Type Singular Name', 'text_domain' ),
    'menu_name' => __( 'Resources', 'text_domain' ),
    'name_admin_bar' => __( 'Resource', 'text_domain' ),
    'archives' => __( 'Resource Archives', 'text_domain' ),
    'attributes' => __( 'Resource Attributes', 'text_domain' ),
    'parent_item_colon' => __( 'Parent Resource:', 'text_domain' ),
    'all_items' => __( 'All Resources', 'text_domain' ),
    'add_new_item' => __( 'Add New Resource', 'text_domain' ),
    'add_new' => __( 'Add New', 'text_domain' ),
    'new_item' => __( 'New Resource', 'text_domain' ),
    'edit_item' => __( 'Edit Resource', 'text_domain' ),
    'update_item' => __( 'Update Resource', 'text_domain' ),
    'view_item' => __( 'View Resource', 'text_domain' ),
    'view_items' => __( 'View Resources', 'text_domain' ),
    'search_items' => __( 'Search Resource', 'text_domain' ),
    'not_found' => __( 'Not found', 'text_domain' ),
    'not_found_in_trash' => __( 'Not found in Trash', 'text_domain' ),
    'featured_image' => __( 'Featured Image', 'text_domain' ),
    'set_featured_image' => __( 'Set featured image', 'text_domain' ),
    'remove_featured_image' => __( 'Remove featured image', 'text_domain' ),
    'use_featured_image' => __( 'Use as featured image', 'text_domain' ),
    'insert_into_item' => __( 'Insert into resource', 'text_domain' ),
    'uploaded_to_this_item' => __( 'Uploaded to this resource', 'text_domain' ),
    'items_list' => __( 'Resources list', 'text_domain' ),
    'items_list_navigation' => __( 'Resources list navigation', 'text_domain' ),
    'filter_items_list' => __( 'Filter resources list', 'text_domain' ),
    );
    $args = array(
    'label' => __( 'Resource', 'text_domain' ),
    'description' => __( 'Custom Post Type for Resources', 'text_domain' ),
    'labels' => $labels,
    'supports' => array( 'title', 'editor', 'excerpt', 'author', 'thumbnail', 'comments', 'revisions', 'custom-fields' ),
    'taxonomies' => array( 'post_tag', 'content_types' ),
    'hierarchical' => false,
    'menu_icon' => 'dashicons-admin-post',
    'public' => true,
    'show_ui' => true,
    'show_in_menu' => true,
    'menu_position' => 5,
    'show_in_admin_bar' => true,
    'show_in_nav_menus' => true,
    'can_export' => true,
    'has_archive' => true,
    'exclude_from_search' => false,
    'publicly_queryable' => true,
    'capability_type' => 'post',
    'show_in_rest' => true,
    'rewrite' => array( 'slug' => 'resources/%resources-type%', 'with_front' => false ),
    );
    register_post_type( 'resources', $args );

    // Register Custom Taxonomies
    $taxonomies = array(
    'topic' => 'Topic',
    'industry' => 'Industry',
    'resources-type' => 'Content Type'
    );

    foreach ( $taxonomies as $taxonomy => $singular ) {
    $labels = array(
    'name' => _x( $singular . 's', 'Taxonomy General Name', 'text_domain' ),
    'singular_name' => _x( $singular, 'Taxonomy Singular Name', 'text_domain' ),
    'menu_name' => __( $singular . 's', 'text_domain' ),
    'all_items' => __( 'All ' . $singular . 's', 'text_domain' ),
    'parent_item' => __( 'Parent ' . $singular, 'text_domain' ),
    'parent_item_colon' => __( 'Parent ' . $singular . ':', 'text_domain' ),
    'new_item_name' => __( 'New ' . $singular . ' Name', 'text_domain' ),
    'add_new_item' => __( 'Add New ' . $singular, 'text_domain' ),
    'edit_item' => __( 'Edit ' . $singular, 'text_domain' ),
    'update_item' => __( 'Update ' . $singular, 'text_domain' ),
    'view_item' => __( 'View ' . $singular, 'text_domain' ),
    'separate_items_with_commas' => __( 'Separate ' . strtolower( $singular ) . 's with commas', 'text_domain' ),
    'add_or_remove_items' => __( 'Add or remove ' . strtolower( $singular ) . 's', 'text_domain' ),
    'choose_from_most_used' => __( 'Choose from the most used', 'text_domain' ),
    'popular_items' => __( 'Popular ' . strtolower( $singular ) . 's', 'text_domain' ),
    'search_items' => __( 'Search ' . strtolower( $singular ) . 's', 'text_domain' ),
    'not_found' => __( 'Not Found', 'text_domain' ),
    'no_terms' => __( 'No ' . strtolower( $singular ) . 's', 'text_domain' ),
    'items_list' => __( $singular . 's list', 'text_domain' ),
    'items_list_navigation' => __( $singular . 's list navigation', 'text_domain' ),
    );
    $args = array(
    'labels' => $labels,
    'hierarchical' => true,
    'public' => true,
    'show_ui' => true,
    'show_admin_column' => true,
    'show_in_nav_menus' => true,
    'show_tagcloud' => true,
    'show_in_rest' => true,
    );
    register_taxonomy( $taxonomy, array( 'resources', 'post' ), $args );
    }
    }
    add_action( 'init', 'cfgi_resources_init', 0 );

    function cfgi_resources_permalink( $permalink, $post ) {
    if ( $post->post_type == 'resource' ) {
    $terms = wp_get_post_terms( $post->ID, 'resources-type' );
    if ( ! is_wp_error( $terms ) && ! empty( $terms ) && is_object( $terms[0] ) ) {
    $taxonomy_slug = $terms[0]->slug;
    return str_replace( '%resources-type%', $taxonomy_slug, $permalink );
    } else {
    return str_replace( '%resources-type%', 'uncategorized', $permalink );
    }
    }
    return $permalink;
    }
    add_filter( 'post_type_link', 'cfgi_resources_permalink', 10, 2 );
    ?>
    Thread Starter aaronnb87

    (@aaronnb87)

    @maybellyne we removed the breadcrumbs from the live site for now as we don’t want users experiencing the issue. The changes were all done on the staging site.

    I’ve just updated to v23.7 on the staging site and re-did the 4 steps you previously outlined. Still experiencing the issue.

    Thread Starter aaronnb87

    (@aaronnb87)

    Hi @maybellyne , I followed the instructions you provided and cleared all caches but the issue remains. Any other ideas?

    Thread Starter aaronnb87

    (@aaronnb87)

    @maybellyne It happens on both live and staging.

    Also looking for this feature

    Thread Starter aaronnb87

    (@aaronnb87)

    Hey, I’m not very happy with the email correspondence. The support staff I’m in contact with doesn’t seem to understand the issue I’m attempting to explain.

    We have since upgraded to the most recent version of the subscriptions plugin but the issue is still there.

    If a users credit card expires, and they try to enter a new credit card (same credit card number, updated expiry date), woocommerce won’t let them add the new method because it appears they are entering a duplicate of the previous/current payment method, even though the expiry date is different…

    Most credit card companies are issuing new cards with the same number and updated expiry. So how are our users suppose to update their payment method when this is the case?

    Thread Starter aaronnb87

    (@aaronnb87)

    It’s not an option to delete a card. There is no hyperlink to allow any action for their current payment method, only a button to add a new payment method.

    Plugin support for WC subscriptions got back to me and pointed out that our WC subscriptions plugin version is out of date. I’m going to try and update that to see if that resolves the issue.

    Thread Starter aaronnb87

    (@aaronnb87)

    Hey, I just tested again and it appears to be working now. must have been a cache issue. Thanks a lot.

    Thread Starter aaronnb87

    (@aaronnb87)

    I have “Use JavaScript Age Gate” checked btw.

    Thread Starter aaronnb87

    (@aaronnb87)

    Hey @philsbury thanks for getting back to me on this. I modified the select-dropdown.js file in the Canadian plugin with the code you provided. I’ve cleared my cache, but it doesn’t seem to have made any change. If I select United States for instance, the message still shows 19 as the minimum age (despite defining it as 21 in the code I shared above).

    Thread Starter aaronnb87

    (@aaronnb87)

    follow up; this is still an issue I’m running into. Any assistance would be appreciated

    the age “%s” set in messaging panel doesn’t update on the front-end when you select a different province. It always displays the default age, even though the actual age validation works correctly.

    Thread Starter aaronnb87

    (@aaronnb87)

    Just an update (incase anyone else has similar needs). I think I found an easier solution to achieve the desired result.

    I modified the list of locations in age-gate-canadian-province.php

    Continuing from Yukon, I added the following

    		[
    			'age'=> 19,
    			'name' => 'Yukon'
    		],
    		[
    			'age'=> 100,
    			'name' => '--Outside Canada--'
    		],
    		[
    			'age'=> 18,
    			'name' => 'Africa'
    		],
    		[
    			'age'=> 18,
    			'name' => 'Asia'
    		],
    		[
    			'age'=> 18,
    			'name' => 'Australia'
    		],
    				[
    			'age'=> 19,
    			'name' => 'Europe'
    		],
    		[
    			'age'=> 19,
    			'name' => 'Latin America'
    		],
    		[
    			'age'=> 21,
    			'name' => 'United States'
    		]
    	];

    This solution should satisfy our legal team for the time being.

    Building out location specific options for this plugin would surely benefit many websites who want to stay compliant across multiple jurisdictions, and thus might be a good feature to consider integrating. Again, this is the only age verification plugin I’ve come across with this capability at the moment. Definitely sets it apart from others.

    Thanks again for the great plugin.

    @paulowen thanks, I was wondering about this as well. Would be good if they included it in the documentation/FAQ’s

Viewing 15 replies - 1 through 15 (of 20 total)