Skip to main content
added 170 characters in body
Source Link
leromt
  • 391
  • 2
  • 6

Unless you have a different function that we are not seeing, in the <td> of your html, you are calling the function "rcp_print_membership_status", however, your function name in the first code example is "rcp_get_status_label". Are you trying to call that first function? If so:

As reads: <?php rcp_print_membership_status( $membership->get_id() ); ?>

Should read: <?php rcp_get_status_label( $membership->get_id() ); ?>

Additionally, you are not returning anything from that function so nothing will be printed/returned. If you are receiving a "status" ID and checking to see what string you should return based on that ID, you are better off just using a switch statement and NOT an array.

Are you expecting that first function to return something that is printed within the <td>?

Unless you have a different function that we are not seeing, in the <td> of your html, you are calling the function "rcp_print_membership_status", however, your function name in the first code example is "rcp_get_status_label". Are you trying to call that first function? If so:

As reads: <?php rcp_print_membership_status( $membership->get_id() ); ?>

Should read: <?php rcp_get_status_label( $membership->get_id() ); ?>

Additionally, you are not returning anything from that function so nothing will be printed/returned.

Are you expecting that first function to return something that is printed within the <td>?

Unless you have a different function that we are not seeing, in the <td> of your html, you are calling the function "rcp_print_membership_status", however, your function name in the first code example is "rcp_get_status_label". Are you trying to call that first function? If so:

As reads: <?php rcp_print_membership_status( $membership->get_id() ); ?>

Should read: <?php rcp_get_status_label( $membership->get_id() ); ?>

Additionally, you are not returning anything from that function so nothing will be printed/returned. If you are receiving a "status" ID and checking to see what string you should return based on that ID, you are better off just using a switch statement and NOT an array.

Are you expecting that first function to return something that is printed within the <td>?

Source Link
leromt
  • 391
  • 2
  • 6

Unless you have a different function that we are not seeing, in the <td> of your html, you are calling the function "rcp_print_membership_status", however, your function name in the first code example is "rcp_get_status_label". Are you trying to call that first function? If so:

As reads: <?php rcp_print_membership_status( $membership->get_id() ); ?>

Should read: <?php rcp_get_status_label( $membership->get_id() ); ?>

Additionally, you are not returning anything from that function so nothing will be printed/returned.

Are you expecting that first function to return something that is printed within the <td>?